RAG Agent billing

Updated at:

RAG Agent charges are based on the number and type of API calls. This page explains the free quota, pricing tiers, API-to-call-count mapping, and a worked example so you can estimate costs before you start.

Free quota

Each day, the first 1,000 API calls are free. The free quota resets daily. Calls beyond 1,000 in a single day are billed at the rates listed below.

Billing method

RAG Agent uses pay-as-you-go billing. Charges are calculated as:

Total cost = Σ (Unit price of each API billing type × Number of calls)

Charges appear on your bill under the billable item RDS-AI Application Data Service.

API billing types and pricing

APIs are grouped into four billing types based on the underlying AI models they use. Each type has a fixed unit price per call.

API billing type

Primary capabilities

Underlying models

Unit price (USD/call)

Intermediate

Embedding, Rerank

qwen3-embedding-v4, gte-rerank-v2

0.0006

Advanced

Knowledge graph construction (basic Large Language Models (LLMs)), Retrieved context summarization, Text parsing

qwen3-flash, qwen3-vl-flash

0.0013

Expert

Knowledge graph construction (basic LLMs), Retrieved context summarization

qwen3-qwq

0.0096

Master

Multimodal parsing

qwen3-vl-plus

0.0210

RAG capabilities and API mapping

Use this table to understand which capabilities each API invokes and roughly how many calls to expect per operation.

Call count key:

Symbol

Meaning

-

Not applicable

✓

1 call

✓✓

A few calls, typically 2–5, depending on the number of datasets

✓✓✓

Multiple calls, typically 5–10, depending on the number of document chunks

✓✓✓✓

Many calls, typically 10–100+, depending on the number of chunks, entities, and relations

API

Text parsing

Multimodal parsing

Embedding

Knowledge graph construction

Retrieved context summarization

Rerank

documents/upload (Standard)

-

-

✓✓✓

✓✓✓✓

-

-

documents/upload (Multimodal)

✓

✓✓

✓✓✓

✓✓✓✓

-

-

documents/upload (Audio/Video)

-

-

✓✓✓

✓✓✓✓

-

-

documents/text

-

-

✓✓✓

✓✓✓✓

-

-

query

-

-

✓

-

✓✓

✓

query/stream

-

-

✓

-

✓✓

✓

cross-query

-

-

✓✓

-

✓✓

✓✓

cross-query/context

-

-

✓✓

-

✓

✓✓

cross-query/stream

-

-

✓✓

-

✓✓

✓✓

search

-

-

✓

-

-

-

For document upload operations, knowledge graph construction dominates the total call count and cost. It can generate 10–100+ calls per upload depending on the number of chunks, entities, and relations extracted.

Billing example

This example estimates the cost of uploading a PDF document with mixed text and images, then running one retrieval query in mix mode with reranking enabled.

Scenario parameters

Parameter

Value

Description

Document word count

40,000 Chinese characters

Approximately 53,000 tokens (1 Chinese character ≈ 1.3 tokens)

Number of images

8

-

chunk_token_size

1200

Maximum tokens per chunk

chunk_overlap_token_size

100

Overlapping tokens between chunks

entity_extract_max_gleaning

1

Supplementary extraction rounds for the knowledge graph

Estimated entities

80

Estimated based on document content and model capabilities

Estimated relations

60

Estimated based on document content and model capabilities

Step 1: Calculate the number of chunks

The system splits the document into chunks before processing.

  • Effective chunk size: chunk_token_size − chunk_overlap_token_size = 1200 − 100 = 1,100 tokens

  • Estimated chunks: 53,000 ÷ 1,100 ≈ 48.18, rounded up to 49 chunks

Step 2: Upload phase — API calls and cost

Uploading this document via documents/upload (Multimodal) triggers text parsing, multimodal parsing, embedding, and knowledge graph construction.

Call count breakdown:

  • Text parsing: 1 call (parses the PDF structure)

  • Multimodal parsing: 8 calls (1 per image)

  • Embedding: 49 chunks + 80 entities + 60 relations = 189 calls

  • Knowledge graph construction: 49 chunks + 80 entities + 60 relations = 189 calls

Cost summary:

API billing type

Included capabilities

Call count

Unit price (CNY/call)

Cost (CNY)

Intermediate

Embedding (chunks, entities, relations)

189

0.0006

0.1134

Advanced

Knowledge graph construction, Text parsing

190

0.0013

0.2470

Master

Multimodal parsing

8

0.0210

0.1680

Total for upload phase

387

-

0.5284

Step 3: Query phase — API calls and cost

One query in mix mode with reranking enabled triggers embedding, reranking, and retrieved context summarization. In mix mode, the system retrieves from multiple knowledge sources (for example, text chunks and entities), which increases embedding calls.

Call count breakdown:

  • Embedding: 3 calls (mix mode retrieval)

  • Rerank: 1 call

  • Retrieved context summarization: 1 call (Advanced-level model)

  • Total: 5 calls

Cost summary:

API billing type

Included capabilities

Call count

Unit price (CNY/call)

Cost (CNY)

Intermediate

Embedding, Rerank

4

0.0006

0.0024

Advanced

Retrieved context summarization

1

0.0013

0.0013

Total for query phase

5

-

0.0037

Step 4: Total cost

Upload phase

Query phase

Total

API calls

387

5

392

Cost (CNY)

0.5284

0.0037

0.5321

Applying the free quota: 392 calls fall within the daily free quota of 1,000 calls. If this is the first use on a given day, the actual bill is CNY 0. Any calls beyond the remaining 608 free calls on the same day are billed at the rates above.

References