A RAG answer over five retrieved documents costs a median 0.50 cents per task across the 326 models I track, about twice the 0.24 cents of a plain chat answer. The spread is wide: GPT-6 Luna, measured, runs at 0.05 cents, while Claude Fable 5.1 is estimated at 14 cents. The retrieved context is billed as input on every query, and that is what separates RAG from chat.
What a RAG query sends
In my RAG task, the model receives a question plus five retrieved documents and returns a grounded answer. A typical run looks like this:
- About 3,600 to 5,200 input tokens, depending on the model's tokenizer
- Roughly 200 to 1,100 visible output tokens
- Between 0 and about 3,100 reasoning tokens, billed at the output rate
Input dominates the token count. A plain chat answer runs the other way, with 35 to 1,280 input tokens and a few hundred to about 1,250 visible output tokens.
Reasoning tokens matter more than their count suggests. They are billed as output tokens, and output is priced several times higher than input for most models. DeepSeek V4.1 Flash, for example, produced 3,102 reasoning tokens on a RAG answer, against 648 visible output tokens.
RAG costs by model
Costs are per task, with the per 1,000 figure alongside.
| Model | Cost per task | Per 1,000 tasks | Input / output / reasoning tokens | Basis |
|---|---|---|---|---|
| GPT-6 Luna | 0.05¢ | $0.54 | 3,690 / 234 / 104 | Measured |
| Claude Haiku 5.5 | 0.14¢ | $1.44 | 5,184 / 1,096 / 753 | Measured |
| Gemini 3.8 Flash | 1.1¢ | $10.84 | 3,608 / 669 / 1,499 | Measured |
| GPT-6.1 Sol | 1.2¢ | $11.80 | 3,690 / 442 / 0 | Measured |
| Claude Sonnet 5.5 | 2.7¢ | $27.31 | 5,184 / 1,079 / 615 | Measured |
| Claude Opus 5.5 | 5.5¢ | $54.62 | 5,184 / 1,079 / 615 | Estimated |
Sonnet and Opus share token counts because the same tokens are priced at different rates. Opus lists at $4.00 input and $20.00 output per 1M tokens against Sonnet's $2.00 and $10.00, so it costs about twice as much per task.
At the top of the range, Claude Fable 5.1 is estimated at 14 cents per task and GPT-6 Astra at 5.9 cents. Both list at $10.00 input and $50.00 output per 1M tokens.
| # | Model | Cost per task | Text score | Tokens in / out | Basis | |
|---|---|---|---|---|---|---|
| 1 | GPT-6 LunaOpenAI | 0.05¢$0.54 / 1,000 | 1443 | 3,690 / 338 | measured best value | |
| 2 | GLM 5.3 FlashZ.ai | 0.06¢$0.57 / 1,000 | 1474 | 3,714 / 1,971 | measured best value | |
| 3 | DeepSeek V4.1 FlashDeepSeek | 0.08¢$0.81 / 1,000 | 1475 | 3,696 / 3,750 | measured best value | |
| 4 | GPT-5.4 NanoOpenAI | 0.12¢$1.16 / 1,000 | 1401 | 3,690 / 338 | estimated | |
| 5 | Claude Haiku 5.5Anthropic | 0.14¢$1.44 / 1,000 | - | 5,184 / 1,849 | measured | |
| 6 | Qwen3.8 FlashAlibaba Qwen | 0.19¢$1.92 / 1,000 | - | 3,751 / 2,886 | measured | |
| 7 | Mistral Small 4Mistral | 0.25¢$2.48 / 1,000 | - | 3,772 / 3,191 | estimated | |
| 8 | Llama 4 MaverickMeta | 0.26¢$2.58 / 1,000 | 1327 | 3,721 / 2,878 | estimated | |
| 9 | MiniMax M3MiniMax | 0.26¢$2.64 / 1,000 | 1441 | 3,773 / 1,259 | measured | |
| 10 | MiMo-V2.6-ProXiaomi | 0.28¢$2.76 / 1,000 | 1479 | 3,807 / 1,266 | estimated best value |
Why token profile beats list price
GPT-6 Luna and Claude Haiku 5.5 have the same list price: $0.10 input and $0.50 output per 1M tokens. Luna costs 0.05 cents per RAG task and Haiku 0.14 cents. The difference is the token profile. Luna produced 234 visible output and 104 reasoning tokens; Haiku produced 1,096 and 753.
Tokenizers also matter. Anthropic's tokenizer produces about 1.39 times as many tokens as OpenAI's for the same English document, so the same retrieved context costs more on Claude before any price difference applies. That is why Claude's RAG input is 5,184 tokens against Luna's 3,690.
Reasoning load can also erase a price advantage. GLM 5.3 Flash lists at $0.15 input and $0.50 output and lands at 0.15 cents per task. Its sibling GLM 5.3 lists at only $0.039 input but $4.80 output, and costs 0.96 cents with the same 1,697 reasoning tokens.
Caching: the main lever for RAG
RAG is the workload where caching pays off most, because retrieved documents and system prompts often repeat across queries. Cached input is priced far below fresh input for most models.
Take Claude Sonnet 5.5, listed at $2.00 per 1M fresh input tokens and $0.10 per 1M cached. Its RAG task sends 5,184 input tokens, so the input share of the 2.7 cent total is the part caching can reduce. Output and reasoning tokens, billed at $10.00 per 1M, are not affected by the cache.
GPT-6 Luna lists at $0.10 input and $0.01 cached. The input share of its task is already small, so caching saves little in absolute terms. Output and reasoning still set most of the cost.
Real savings depend on your cache hit rate, which depends on your retrieval layer. If each query pulls a different set of five documents, the prefix changes and the discount shrinks. A stable system prompt and a stable document set benefit most.
RAG versus a plain chat answer
The gap between the two tasks varies by model.
| Model | RAG | Chat |
|---|---|---|
| GPT-6 Luna | 0.05¢ | 0.06¢ |
| Claude Sonnet 5.5 | 2.7¢ | 1.3¢ |
| Claude Opus 5.5 (estimated) | 5.5¢ | 2.5¢ |
| Median of 326 models | 0.50¢ | 0.24¢ |
For GPT-6 Luna, RAG is slightly cheaper than chat, because its chat run produced 540 output and 639 reasoning tokens against 234 and 104 for RAG. For Claude models the RAG cost is roughly double, driven by the 5,184 input tokens. For chat tasks, see the chatbot answer page.
Choosing a model for RAG
Start with cost per task, not list price. Two models with similar per-token prices can differ several times once reasoning and tokenizer effects are counted.
- Measure reasoning token counts on your own queries, since some models produce large hidden traces.
- Check whether your provider supports cached input and whether your documents repeat often enough to hit the cache.
- Compare tokenizer ratios when moving between providers, since the same corpus can cost more on one than another.
Run your own numbers in the cost calculator and see the methodology for how I measure. Per-model detail is on the RAG answer task page, GPT-6 Luna and Claude Sonnet 5.5.
FAQ
How much does one RAG query cost?
Across the 326 models I track, a RAG answer over five retrieved documents has a median cost of 0.50 cents. The range runs from 0.05 cents for GPT-6 Luna to an estimated 14 cents for Claude Fable 5.1.
Does caching make RAG cheaper?
Yes, when the same retrieved context repeats. On Claude Sonnet 5.5, cached input is listed at $0.10 per 1M tokens against $2.00 fresh, which lowers the 2.7 cent task cost. The saving shrinks if your retrieved documents change on every query.
Is RAG more expensive than a plain chat answer?
Usually. The median RAG answer costs 0.50 cents against 0.24 cents for chat, because RAG sends several thousand input tokens per query. For a few cheap models, such as GPT-6 Luna, the two cost nearly the same.