Home / Guides / What a RAG query costs: retrieval-augmented answers priced

What a RAG query costs: retrieval-augmented answers priced

Five retrieved documents plus a question: what one grounded answer costs.

By Piotr Olszewski · Oct 11, 2026 · prices as of Oct 18, 2026

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.

ModelCost per taskPer 1,000 tasksInput / output / reasoning tokensBasis
GPT-6 Luna0.05¢$0.543,690 / 234 / 104Measured
Claude Haiku 5.50.14¢$1.445,184 / 1,096 / 753Measured
Gemini 3.8 Flash1.1¢$10.843,608 / 669 / 1,499Measured
GPT-6.1 Sol1.2¢$11.803,690 / 442 / 0Measured
Claude Sonnet 5.52.7¢$27.315,184 / 1,079 / 615Measured
Claude Opus 5.55.5¢$54.625,184 / 1,079 / 615Estimated

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.

#ModelCost per taskText scoreTokens in / outBasis
1OpenAI logo
GPT-6 LunaOpenAI
0.05¢$0.54 / 1,000
14433,690 / 338measured best value
2Z.ai logo
GLM 5.3 FlashZ.ai
0.06¢$0.57 / 1,000
14743,714 / 1,971measured best value
3DeepSeek logo
DeepSeek V4.1 FlashDeepSeek
0.08¢$0.81 / 1,000
14753,696 / 3,750measured best value
4OpenAI logo
GPT-5.4 NanoOpenAI
0.12¢$1.16 / 1,000
14013,690 / 338estimated
5Anthropic logo
Claude Haiku 5.5Anthropic
0.14¢$1.44 / 1,000
-5,184 / 1,849measured
6Alibaba Qwen logo
Qwen3.8 FlashAlibaba Qwen
0.19¢$1.92 / 1,000
-3,751 / 2,886measured
7Mistral logo
Mistral Small 4Mistral
0.25¢$2.48 / 1,000
-3,772 / 3,191estimated
8Meta logo
Llama 4 MaverickMeta
0.26¢$2.58 / 1,000
13273,721 / 2,878estimated
9MiniMax logo
MiniMax M3MiniMax
0.26¢$2.64 / 1,000
14413,773 / 1,259measured
10Xiaomi logo
MiMo-V2.6-ProXiaomi
0.28¢$2.76 / 1,000
14793,807 / 1,266estimated 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.

ModelRAGChat
GPT-6 Luna0.05¢0.06¢
Claude Sonnet 5.52.7¢1.3¢
Claude Opus 5.5 (estimated)5.5¢2.5¢
Median of 326 models0.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.