Knowledge base pricing

更新时间:
复制 MD 格式
Important

Data in knowledge bases created before January 4, 2026, for which the service has not been enabled, will be retained until June 30, 2026. If the service is not enabled by this date, the data will be permanently deleted. Enable the knowledge base service before this date.

1. Billing methods

The knowledge base service offers two billing methods: pay-as-you-go and prepaid resource packages. After you enable the knowledge base service, you are billed on a pay-as-you-go basis by default. You can purchase a RAG Standard Edition resource package or an RAG Enterprise Edition resource package in the console.

  • Service enablement: Free of charge.

  • Billing start point: Charges begin when you create a knowledge base.

  • Deduction logic

    • Deduction order: Free Quota > resource package > pay-as-you-go. If you have multiple knowledge bases, the free quota or resource package is consumed based on the number of running knowledge bases.

    • Overage: After your free quota and resource package are fully consumed, you are automatically billed on a pay-as-you-go basis.

  • Billing models

    • Free quota: The validity period of the free quota (for Standard Edition knowledge bases) starts when you enable the knowledge base service.

    • Resource package: Available in various sizes. For specifications and prices, see resource packages.

    • Pay-as-you-go: The system automatically charges your Alibaba Cloud account based on the edition and cumulative runtime. Charges are billed on an hourly basis. Make sure your account has a sufficient balance. You can add funds on the Billing Management page.

  • Stop billing: If you no longer need a knowledge base, delete it to stop billing.

    Important

    Deleting a knowledge base permanently erases all data within it, and this action cannot be undone. Proceed with caution and back up your data beforehand.

2. Cost components

The total cost of a knowledge base comprises two components: the edition fee and the model invocation fee.

2.1 Edition fee

The edition fee is the charge for the runtime of your knowledge base. Alibaba Cloud Model Studio offers two knowledge base editions: Standard Edition and Ultimate Edition.

If you choose to use your own ADB-PG instance for vector storage, you are billed separately for that service.
  • Standard Edition: Suitable for individual use, small-scale applications, or proof-of-concept environments.

  • Enterprise Edition: Suitable for production-grade environments with high concurrency requirements.

Edition

Max retrieval concurrency

Storage space

Price

Standard Edition

1 QPS (fixed, not adjustable)

Platform storage ≤ 100 GB

CNY 0.03/knowledge base/hour

Enterprise Edition

50–10,000 QPS (adjustable, corresponds to 1–200 RCUs)

Platform storage ≤ 9,999 GB (If you need more storage, you can select and configure your own ADB-PG instance when creating the knowledge base. See Create a knowledge base.)

CNY 0.2/RCU/hour

Note
  • RCU: A Retrieval Compute Unit (RCU) is a unit of measurement for the concurrent retrieval capacity of a knowledge base. 1 RCU supports a maximum of approximately 50 QPS for online retrieval. The more RCUs you have, the higher the concurrency your knowledge base can support.

  • How to estimate required RCUs: Required RCUs = CEILING(Peak retrieval QPS requirement ÷ 50). For example, a peak demand of 80 QPS requires at least 2 RCUs.

  • Maximum concurrency: This refers to the core retrieval performance of the knowledge base itself, excluding dependent services like the rerank model.

    If dependent services such as embedding or rerank models are rate-limited, we will scale them up as quickly as possible. However, a few retrieval requests may be temporarily degraded, causing a brief performance decline.
  • Storage space fee: The prices listed above include the cost of platform storage. If you choose to use your own ADB-PG instance, you will incur separate charges for that service. The price is subject to the ADB-PG pricing page.

  • Modify configuration: You are charged based on segmented billing according to when the configuration change occurs. The modification itself is free. You can modify a knowledge base configuration once per calendar day.

Free quota

Model Studio provides all users with a one-time free quota of 720 hours for the knowledge base service. After the free quota is used up, you are billed on a pay-as-you-go basis.

Important

For existing users, the free quota is valid until 23:59 on February 3, 2026. After expiration, billing will automatically switch to a pay-as-you-go basis.

For new users, the free quota is valid for 30 days from the date of service enablement. Any remaining quota is forfeited upon expiration and cannot be used.

Existing users are those who enabled the service before the official billing start date of January 4, 2026. New users are those who enable the service for the first time on or after that date.

On the Knowledge Base page, you can click View Bills in the upper-right corner to check your remaining free hours and their validity period.

image

Usage rules

  • Scope: The free quota only applies to the edition fee for Standard Edition knowledge bases. It does not apply to the Enterprise Edition.

  • Deduction method: The quota is consumed based on the cumulative runtime. If you run multiple knowledge bases, the free quota is deducted based on the number of instances.

    For example, if you run four Standard Edition knowledge bases simultaneously, 4 hours of the free quota are consumed every hour.
  • Exclusions: The model invocation fee is not covered by the free quota and is subject to the billing policy of the respective model.

Example

  • Running a single Standard Edition knowledge base: 720 hours ÷ 1 instance = 720 hours of free runtime

  • Running two Standard Edition knowledge bases simultaneously: 720 hours ÷ 2 instances = 360 hours of free runtime

Resource packages

A resource package is valid for one year after purchase. Unused hours in the resource package expire and are forfeited after one year.

RAG Standard Edition resource package specifications and prices

Unit

Instance-hours

Use case

Price (CNY)

1 instance/month

720

1 knowledge base for 1 month

20

1 instance/quarter

2,160

1 knowledge base for 1 quarter

59

1 instance/year

8,760

1 knowledge base for 1 year

239

10 instances/year

87,600

10 knowledge bases for 1 year

2,099

50 instances/year

438,000

50 knowledge bases for 1 year

9,999

100 instances/year

876,000

100 knowledge bases for 1 year

18,999

RAG Enterprise Edition resource package specifications and prices

Unit

RCU-hours

Use case

Price (CNY)

1 RCU/month

720

1 knowledge base for 1 month

139

1 RCU/quarter

2,160

1 knowledge base for 1 quarter

399

1 RCU/year

8,760

1 knowledge base for 1 year

1,599

10 RCUs/year

87,600

10 knowledge bases for 1 year

14,999

30 RCUs/year

262,800

30 knowledge bases for 1 year

41,999

50 RCUs/year

438,000

50 knowledge bases for 1 year

65,999

Usage notes

  • Effective time: Immediately after purchase.

  • Validity period: Determined by the purchased package. Unused hours are forfeited upon expiration.

  • Deduction logic

    • Deduction order: Free Quota > resource package > pay-as-you-go.

    • Multiple resource packages of the same type: The package that expires first is consumed first. If expiration dates are the same, the package purchased first is consumed first.

    • If you have multiple knowledge bases, the free quota or resource package is consumed based on the number of running instances.

    • Overage: Once a resource package expires or is depleted, usage is billed on a pay-as-you-go basis.

  • Monitor balance and set alerts

  • Unsubscription

    • According to the unsubscription rules, you can request a refund for the unused portion of a prepaid product. The used portion is non-refundable. After unsubscribing, the knowledge base reverts to pay-as-you-go billing. To stop all charges, delete the knowledge base.

2.2 Model invocation fee

When you create, update, retrieve from, or perform hit testing on a knowledge base, the service calls an embedding model (for vectorization) and a rerank model (for reranking), which incur fees.

Important

The model invocation fee is a separate billing item calculated based on the actual number of input tokens. Its price and free quota follow the invocation billing standards of the corresponding model in Model Studio and are not included in the edition fee.

Billing formula: Model fee = (Total input tokens / 1,000) × Model price (CNY per 1,000 tokens)

Billing rules for multiple knowledge bases:

2.2.1 Create or update a knowledge base

  • Invocation scenario: When you upload a new file or perform an incremental update, the service calls an embedding model to vectorize the text content.

  • Billing details: You are charged based on the number of tokens in the new content. Deleting files does not incur a model invocation fee.

2.2.2 Retrieve from a knowledge base

  • Invocation scenarios

    1. An embedding model is called to vectorize the user's query.

    2. A rerank model is called to reorder the initially retrieved results, improving the accuracy of the final answer.

  • Billing details

    • Query vectorization fee: Billed based on the number of tokens in the user's input content.

    • Reranking fee (can be disabled): This is the main component of the retrieval fee. The fee depends on the total number of chunks from the initial retrieval.

  • Retrieval process and billing relationship

    image
    1. Initial retrieval

      The system retrieves text chunks from the knowledge base based on the following parameters:

      • Initial Vector Retrieval Top-K: Controls the number of relevant chunks retrieved based on semantic similarity (default: 50).

      • Initial Keyword Retrieval Top-K: Controls the number of relevant chunks retrieved based on exact text matching (default: 50).

    2. Reranking

      1. All chunks from the initial retrieval are sent to the rerank model for reordering.

      2. Fee = Total chunks from initial retrieval × Average tokens per chunk × Model price (see Model invocation billing)

        Important

        The rerank model fee is determined by the total number of chunks from the initial retrieval, not the number of chunks returned in the final result.

    3. Final retrieval

      After reranking, the system returns a number of chunks specified by the Max Final Results parameter (e.g., 5).

2.2.3 Cost optimization tips

Two ways to optimize costs:

Disable reranking

Adjust initial parameters

If your application does not require high search precision, disable reranking to eliminate the rerank model fee.

Related documentation: Reranking configuration.

  • Impact: This action reduces the relevance ranking of search results.

  • Procedure:

    • For legacy agent and workflow applications:

      In your application, click the Debug button to the right of the knowledge base. On the page that appears, turn off the Re-ranking Strategy switch.

    • For new agent applications:

      On the knowledge base card, click Hit Test, select Do Not Use Model, and click Save.

      image

By reducing the values of Initial Vector Retrieval Top-K and Initial Keyword Retrieval Top-K, you decrease the number of tokens sent to the rerank model, which lowers costs.

  • Impact: This action may affect the final retrieval quality. Adjust the parameters to balance cost and performance.

  • Procedure: Adjust the parameters on the Modify or Hit Test page of the knowledge base and click Save.

    image

Note

When you click Hit Testing on the knowledge base card to enter the configuration and debugging page, you will incur charges for model invocations (embedding model and rerank model).

3. Pricing examples

3.1 Continuous runtime (1 day)

Edition

Configuration

Quantity

Daily edition fee

Standard Edition

Uses platform storage

1

24 hours × CNY 0.03/hour = CNY 0.72

Enterprise Edition

Uses platform storage, 1 RCU

1

24 hours × 1 RCU × CNY 0.2/RCU/hour = CNY 4.80

3.2 Create, update, and retrieve

This example is based on the text-embedding-v4 (embedding model) and qwen3-rerank (rerank model), both priced at CNY 0.0005 per 1,000 tokens.

Billing logic: Fee = Token consumption (in units of 1,000 tokens) × Model price

  • Create a knowledge base

    • Operation: Upload a file containing 50,000 tokens for vectorization.

    • Fee: 50 × CNY 0.0005/1,000 tokens = CNY 0.025

  • Update a knowledge base

    • Operation: Add a new file containing 20,000 tokens.

    • Fee: 20 × CNY 0.0005/1,000 tokens = CNY 0.01

  • Retrieve from a single knowledge base

    • Operation: Input a query of 100 tokens, which retrieves 150 relevant chunks (averaging 500 tokens/chunk) for reranking.

    • Fee:

      • Query vectorization: 0.1 × CNY 0.0005/1,000 tokens = CNY 0.00005

      • Tokens for reranking: 150 chunks × 500 tokens/chunk = 75,000 tokens

      • Reranking fee (if applicable): 75 × CNY 0.0005/1,000 tokens = CNY 0.0375

      • Total: CNY 0.00005 (Query vectorization) + CNY 0.0375 (Reranking) = CNY 0.03755

  • Retrieve from multiple knowledge bases

    • Operation: A Model Studio agent is associated with four knowledge bases. The same query is executed once in each knowledge base by default (this cannot be changed).

    • Fee: CNY 0.03755/retrieval × 4 = CNY 0.1502

3.3 Configuration change (segmented billing)

  • Scenario: Between 14:40 and 15:40, a knowledge base is upgraded from Standard Edition to Enterprise Edition (2 RCUs) at 15:10. During this hour, it runs as Standard Edition for 30 minutes (0.5 hours) and as Enterprise Edition for 30 minutes (0.5 hours).

  • Edition fee (from 14:40 to 15:40):

    • Standard Edition: 0.50 hours × CNY 0.03/hour = CNY 0.015

    • Enterprise Edition: 0.50 hours × 2 RCUs × CNY 0.2/RCU/hour = CNY 0.20

    • Total: CNY 0.215

3.4 Runtime less than one hour

  • Scenario: A Standard Edition knowledge base is created at 14:12 and deleted at 14:21, for a total runtime of 9 minutes (0.15 hours).

  • Edition fee (from 14:12 to 14:21): 0.15 hours × CNY 0.03/hour = CNY 0.0045

4. Billing

4.1 View bills and usage

4.1.1 Query edition fee

On the Billing Details page, export your bill. In the bill (aggregated by Hour), you can view the edition fee for a specific knowledge base during the corresponding period in the List Price column.

The instance ID in the figure is the knowledge base ID.

11111

4.1.2 Query token consumption and costs

On the Billing Details page, export your bill. In the bill (aggregated by Hour), you can view the token usage in the Usage column and the corresponding cost in the List Price column for a specific period.

Embedding model usage

Hover over the instance ID on the bill: if the instance ID is in the format llm-xxx;xxx-embedding-xxx;embedding_token;RAG;0, it indicates that the bill was generated by an embedding model.

123123

Rerank model usage

Hover over the instance ID on the bill: if the instance ID is in the format llm-xxx;xxx-rerank;embedding_token;RAG;0, the bill is generated by a rerank model.

11111

4.2 Cost allocation

If you need to allocate costs to different departments or projects, you can use the tag feature to mark each workspace.

Step 1: Obtain workspace information

In Workspace Management, identify the Workspace ID (for example, llm-xxx) of the workspace associated with the tag.

image

Step 2: Bind tags

  1. On the Tag Management page, select Bind Tags to Resources.

    image

  2. For Resource Selection Method, select Enter Multiple Resource IDs. On the Product tab, search for and select Model Service Bailian: Workspace and the region of the workspace. In the Resource ID text box, enter the Workspace ID. Click Bind Tags.

    image

  3. On the Bind Tags page, create a tag key and value or select an existing preset tag. Click Confirm to bind the tag to the workspace.

    image

    image

Step 3: Verification

You have now bound tags to your Model Studio workspace and can verify them in the Instance Tag column on the Billing Details page.

There is a delay of up to several hours for newly created instance tags.

image

4.3 Overdue payments

If your Alibaba Cloud account has an overdue payment, all its knowledge bases enter the Service Suspended state, and billing stops. You cannot retrieve, update, or create knowledge bases from the console or by using an API.

  • Vector storage using platform storage:

    • Days 0–14: You cannot retrieve, update, or create knowledge bases from the console or by using an API, but your existing data is retained. Service is automatically restored if you pay all overdue bills within the first 14 days.

    • Day 15 and later: On the 15th day after the payment becomes overdue, you are considered to have voluntarily given up the pay-as-you-go service for the knowledge base. Model Studio releases the related knowledge bases and permanently deletes their data. This data cannot be recovered.

  • Vector storage using a self-purchased ADB-PG instance:

    • Days 0–7: You cannot retrieve, update, or create knowledge bases from the console or by using an API, but your existing data is retained. Service is automatically restored if you pay all overdue bills within the first 7 days.

    • Day 8 and later: On the 8th day after the payment becomes overdue, you are considered to have voluntarily given up the pay-as-you-go service for ADB-PG. ADB-PG releases the instances related to the knowledge base and permanently deletes their data. This data cannot be recovered. For more information, see Overdue payments for ADB-PG.

      Note

      When you use a self-purchased ADB-PG instance, the data retention period follows the overdue payment policy of ADB-PG. The retention period is 7 days, not 14 days.

5. Frequently asked questions

  1. Can a RAM user activate a knowledge base or view bills?

    Yes. An authorized RAM user (with the AliyunBailianFullAccess or AliyunSFMFullAccess system policy) can activate a knowledge base. The fees are charged to the root account. For information about how to configure permissions, see Permission management.

  2. What does "free storage" for the Standard and Enterprise Editions specifically refer to?

    It refers only to the free storage provided by the platform. If you purchase your own ADB-PG instance, it is billed by the ADB-PG service and is not included in the knowledge base bill.

  3. What if my knowledge base has a large amount of data and the platform storage for the Enterprise Edition is insufficient?

    When creating a knowledge base, select your own ADB-PG instance for vector storage. See Create a knowledge base.

  4. How are configuration changes that span across hours billed?

    Billing is segmented based on the time the change occurs. Charges within a single hour are prorated based on the duration of each configuration. For an example, see Configuration changes (segmented billing).

  5. Why are my rerank fees so high? How can I reduce model invocation fees?

    The fees for the rerank model are not related to the number of results you receive. Instead, they are determined by the total number of text chunks from the initial retrieval. To reduce model invocation fees, see 2.2.3 Cost optimization tips.

  6. How do I completely stop billing for a knowledge base? Can I just delete the files in it?

    No. The only way to stop billing is to delete the entire knowledge base instance.

    • Incorrect method: Deleting only the files within the knowledge base just clears the data. The knowledge base instance, which is the billable entity, continues to run, so edition fees will continue to be charged.

    • Correct method: Find the corresponding knowledge base instance in the console and delete it.

    Important

    The delete operation permanently erases all data in the knowledge base, and the data cannot be recovered. Proceed with caution.

  7. Why is the number of rerank model invocations greater than the number of application calls?

    This is an automatic optimization performed by the system to improve performance. When a single request sent to the rerank model contains a large number of chunks, the system splits it into multiple batches (Batch) to invoke the rerank model, which speeds up processing.

    This increases the recorded number of rerank model invocations, but the total fee remains unchanged because billing is related only to the total token consumption, not the number of invocations.