Knowledge base billing methods, cost components, billing examples, and bill management
Alibaba Cloud Bailian Knowledge Base service officially begins billing on January 4, 2026. This document details the knowledge base billing rules, including cost composition, calculation methods, and cost optimization strategies.
Knowledge bases created before January 4, 2026 but not yet activated will retain data until June 30, 2026. If service activation is not completed by then, data will be permanently deleted. Please activate the Knowledge Base service promptly.
The knowledge base offers two billing methods: Pay-as-you-go (metered billing) and prepaid resource packages. By default, newly activated knowledge base services use Pay-as-you-go billing. Resource packages can be purchased via the console: Standard Edition Resource Package or Enterprise Edition Resource Package.
Service Activation: Free of charge.
Billing Start Point: Billing begins upon successful knowledge base creation.
Deduction Logic:
Deduction Order: Free Quota > Resource Package > Pay-as-you-go. Free quota or resource package usage is deducted proportionally across multiple knowledge bases.
Excess Handling: Once your free quota and resource package are exhausted, billing automatically switches to Pay-as-you-go.
Billing Modes:
Free Quota: For Standard Edition knowledge bases, the validity period of the free quota starts upon service activation.
Resource Package: Packages are tiered by business volume and purchased with a one-time payment.
Pay-as-you-go: Fees are automatically deducted hourly from your Alibaba Cloud account based on the selected specification. Ensure sufficient account balance (recharge via the Cost & Billing page).
Billing Termination: To stop billing for an unused knowledge base, delete it immediately.
Deletion permanently removes all data in the knowledge base with no recovery option. Proceed with extreme caution.
Specification fees cover runtime charges for the knowledge base. Alibaba Cloud Bailian offers two specifications: Standard Edition and Enterprise Edition.
If you choose to use your own ADB-PG instance as vector storage, additional ADB-PG fees apply.
Standard Edition: Suitable for individual users, small-scale deployments, or proof-of-concept (PoC) environments.
Enterprise Edition: Designed for high-concurrency, production-grade environments.
Specification
Max Concurrent Queries (Knowledge Base Retrieval)
Storage Capacity
Price
Standard Edition
1 QPS (fixed; non-adjustable)
Platform storage ≤ 100 GB
¥0.03 / knowledge base / hour
Enterprise Edition
50–10,000 QPS (adjustable, corresponding to 1–200 RCU)
Platform storage ≤ 9,999 GB (for larger storage, select and configure your own ADB-PG instance during knowledge base creation)
¥0.20 / RCU / hour
RCU (Retrieval Compute Unit): Measures concurrent retrieval capacity. 1 RCU ≈ supports up to 50 QPS for online retrieval. Higher RCU enables greater concurrency.
Estimating Required RCU: Required RCU = ⌈Peak QPS requirement ÷ 50⌉. For example, 80 QPS peak demand requires at least 2 RCU.
Max Concurrent Queries: Refers to core retrieval performance of the knowledge base itself (excluding dependent chains, e.g., ranking models).
During Enterprise Edition retrieval, if upstream dependencies (e.g., Embedding or Rerank models) throttle under extreme load, we’ll rapidly scale those services—but brief degradation of some retrieval requests may occur temporarily.
Storage Fees: Prices above include platform storage. Using your own ADB-PG incurs separate fees—see ADB-PG Pricing.
Specification Changes: Billed in segments based on effective time. No fee for changing specifications. Up to one specification change per natural day per knowledge base.
Alibaba Cloud Bailian provides all users with a one-time 720-hour free quota, after which Pay-as-you-go billing applies.
Existing Users: Free quota expires uniformly on February 3, 2026, 23:59 (UTC+8). Post-expiry, billing reverts to Pay-as-you-go.
New Users: Free quota is valid for 30 days from activation date. Unused quota expires and cannot be extended.
Existing Users: Those who activated service before January 4, 2026 (billing launch date). New Users: Those activating service on or after January 4, 2026.
View remaining free hours and expiry in the top-right corner of the knowledge base page via View Bill.Usage Rules
Applicability: Applies only to Standard Edition specification fees—not Enterprise Edition.
Deduction Method: Deducted cumulatively based on actual runtime. Multiple knowledge bases share the quota proportionally.
Example: Running 4 Standard Edition knowledge bases consumes 4 hours of quota per hour.
Exclusions: Model invocation fees are not covered by the free quota and follow respective model pricing.
Multi-KB Deduction: Free quota/resource packages are shared proportionally across KBs.
Excess Handling: After all applicable packages expire or deplete, excess usage defaults to Pay-as-you-go.
Usage Monitoring & Alerts:
Check Balance: View remaining hours at Resource Packages; click Statistics for usage details.
Set Alerts: Configure budget alerts. System notifies via SMS/email/in-app message when usage falls below threshold.
Cancellation Policy: Per Alibaba Cloud rules, unused prepaid amounts are refundable; used portions are non-refundable. Post-cancellation, KBs switch to Pay-as-you-go. Delete KBs to halt billing.
Large language models generating answers in Q&A services (selected by user in app)
Model invocation fees are independent charges, calculated based on actual input token count, per the model’s pricing on the Model Marketplace. These fees are not included in knowledge base specification fees.
Billing Formula: Model Fee = (Total Input Tokens ÷ 1,000) × Model Unit Price (¥/1,000 tokens)Multi-KB Billing Rule: When an Alibaba Cloud Bailian application mounts multiple KBs, retrieval executes across all KBs. Token consumption (Query embedding + Reranking) scales linearly with KB count (N KBs → N× consumption).
Query Embedding: Calls embedding model to vectorize user query (Query).
KB Routing (Optional): If app links multiple KBs with routing enabled, qwen-plus determines target KBs—billed per qwen-plus token usage.
Reranking (Optional): Calls reranking model to reorder initial results for higher answer precision. Document search KBs use qwen3-rerank; image/Q&A/audio/video KBs use qwen3-vl-rerank.
Billing Details:
Query Embedding Fee: Based on user input token count.
Reranking Fee (Configurable): Primary retrieval cost. Depends on total number of chunks retrieved in initial recall.
Retrieval Workflow & Billing Relationship
Initial Recall: System retrieves text chunks from KB using:
Semantic TopK: Controls chunks retrieved by semantic similarity (default: 50).
Keyword TopK: Controls chunks retrieved by exact text match (default: 50).
Reranking:
All initially recalled chunks are fed into the Rerank model.
Fee = Total Initial Chunks × Avg Chunk Tokens × Model Unit Price
Reranking fees depend on total initially recalled chunks, not final returned chunks.
Final Recall: After Rerank sorting, system returns top-N chunks per configured parameter (e.g., 5).
Using Hit Test on the KB card enters configuration/debug mode—triggering model invocation fees (embedding + reranking).
When using KBs for Q&A via Bailian apps (Agent Apps or Workflow Apps), beyond retrieval-stage model fees, additional fees apply:
Q&A Generation Model: System uses your selected model (e.g., qwen-plus) to generate answers—billed per its token usage.
Pre-file Parsing (Optional): If users upload files in chat with pre-parsing enabled, qwen3-rerank processes file content—billed per rerank token usage.
KB Routing (Optional): If app links multiple KBs with routing enabled, qwen-plus performs routing decisions.
Full Q&A service cost = Specification Fee (KB runtime) + Retrieval Model Fees (embedding + reranking + routing) + Q&A Model Fees (generation + pre-file parsing). Each model fee is calculated independently based on actual token consumption.
Example uses document-search KB with text-embedding-v4 (embedding) and qwen3-rerank (reranking), both priced at ¥0.0005 / 1,000 tokens.Billing Logic: Fee = Token Consumption (in "1,000 tokens") × Model Unit PriceKB Creation
Export from Bill Details page. In hourly-aggregated bills, locate Category Total Price column for your KB’s specification fee.
Instance ID in screenshot = KB ID.
Filter Product Name = Large Language Model Platform Bailian, Item Name = Bailian Knowledge Base (RAG) - Pay-as-you-go, to view billing items (e.g., Standard Edition - Compute Resource) and unit prices (e.g., ¥0.03/(unit × hr)).
Export from Bill Details page. Hourly-aggregated bills show Usage (tokens) and Category Total Price columns.Viewing Embedding Model Usage
Hover over Instance ID in bill: If ID format is llm-xxx;xxx-embedding-xxx;embedding_token;RAG;0, it’s embedding-model-generated.In Bill Details, set Billing Date = Monthly, Product Name = Large Language Model Platform Bailian, Item Name = Bailian LLM Inference, Include Zero Amount = Yes. Table shows hourly token usage, service start/end times, item name, usage, unit ("1,000 Tokens"), official list price, and category total.Viewing Reranking Model Usage
Hover over Instance ID: If ID format is llm-xxx;xxx-rerank;embedding_token;RAG;0, it’s reranking-model-generated.In Bill Details, filter Product Name = Large Language Model Platform Bailian, Item Name = Bailian LLM Inference. Look for Item Name = "Text Embedding Usage" to see hourly usage (unit: "1,000 tokens") and associated category totals.
To allocate costs across departments/projects, use tags to label Workspaces.Step 1: Get Workspace Info
In Workspace Management, identify the Workspace ID (e.g., llm-xxx) for tagging.Step 2: Bind Tags
Choose Input Multiple Resource IDs, search/select "Large Language Model Platform Bailian: Workspace", pick region, enter Workspace ID, then click Bind Tags.
Create new tag key-value pairs or select existing ones → click Confirm to bind.
Post-binding, a confirmation dialog displays resource IDs, status, and failure reasons. Click OK after verification.
Step 3: Verify
You’ve now tagged your Bailian workspace. Verify in Bill Details via the Instance Tags column.
New instance tags may take hours to appear.
Filter Product Name = Large Language Model Platform Bailian, Item Name = Bailian Knowledge Base (RAG) - Pay-as-you-go.
Upon account arrears, all KBs enter Service Suspended state (no console/API retrieval/update/creation) and billing stops.Vector Storage: Platform Storage
Duration
Description
0–14 days
KBs inaccessible via console/API, but data retained. Full payment within 14 days restores service automatically.
≥15 days
On Day 15, KBs are deemed abandoned. Bailian releases KBs and permanently deletes data—irrecoverable.
Vector Storage: Self-provisioned ADB-PG
Duration
Description
0–7 days
KBs inaccessible via console/API, but data retained. Full payment within 7 days restores service automatically.
≥8 days
On Day 8, ADB-PG service is deemed abandoned. ADB-PG cleans related instances and permanently deletes data—irrecoverable.
Yes. Authorized sub-accounts (with policies AliyunBailianFullAccess or AliyunSFMFullAccess) can activate KBs—the costs are billed to the primary account.
Why does Reranking model invocation count exceed app calls?
This is an automatic performance optimization. When large batches of chunks are sent to the Reranking model, the system splits them into smaller batches (Batch) for faster processing.This increases recorded invocation counts, but total cost remains unchanged, as billing depends solely on total token consumption—not call count.