RAG question answering cost drivers
Retrieved passages often make input substantially larger than output, which changes the value of cached-input pricing and context trimming.
Compare LLM API costs for retrieval-augmented generation with document context, grounded answers, and repeat traffic.
Teams estimating the generation portion of a RAG application.
Gemini 2.5 Flash-Lite for the current assumptions
Lowest cost does not mean best model. Test output quality, latency, retries, and reliability on your own workload.
Comparing 22 models that fit the initial input length.
| Model | Provider | Input cost | Output cost | Monthly estimate | Context usage |
|---|---|---|---|---|---|
| Gemini 2.5 Flash-Lite | $29.20 | $14.00 | $43.20 | 0.8% | |
| DeepSeek V4 Flash non-thinking | DeepSeek | $39.54 | $9.80 | $49.34 | 0.8% |
| GPT-4o mini | OpenAI | $51.00 | $21.00 | $72.00 | 6.3% |
| gpt-5.4-nano | OpenAI | $58.40 | $43.75 | $102.15 | 2.0% |
| Gemini 3.5 Live Translate Preview | $73.00 | $52.50 | $125.50 | 6.1% | |
| Gemini 3.1 Flash-Lite | $73.00 | $52.50 | $125.50 | 0.8% | |
| deepseek-v4-pro | DeepSeek | $122.24 | $30.45 | $152.69 | 0.8% |
| Gemini 2.5 Flash | $87.60 | $87.50 | $175.10 | 0.8% | |
| Gemini 3 Flash Preview | $146.00 | $105.00 | $251.00 | 0.8% | |
| gpt-5.4-mini | OpenAI | $219.00 | $157.50 | $376.50 | 2.0% |
| Claude Haiku 4.5 | Anthropic | $292.00 | $175.00 | $467.00 | 4.0% |
| gpt-5.6-luna | OpenAI | $292.00 | $210.00 | $502.00 | 0.8% |
| Gemini 2.5 Pro | $365.00 | $350.00 | $715.00 | 0.8% | |
| Gemini 3.5 Flash | $438.00 | $315.00 | $753.00 | 0.8% | |
| Claude Sonnet 5 | Anthropic | $584.00 | $350.00 | $934.00 | 0.8% |
| Gemini 3.1 Pro Preview | $584.00 | $420.00 | $1,004.00 | 0.8% | |
| GPT-4o | OpenAI | $850.00 | $350.00 | $1,200.00 | 6.3% |
| gpt-5.6-terra | OpenAI | $730.00 | $525.00 | $1,255.00 | 0.8% |
| Claude Sonnet 4.6 | Anthropic | $876.00 | $525.00 | $1,401.00 | 0.8% |
| Claude Opus 4.8 | Anthropic | $1,460.00 | $875.00 | $2,335.00 | 0.8% |
| gpt-5.6-sol | OpenAI | $1,460.00 | $1,050.00 | $2,510.00 | 0.8% |
| Claude Fable 5 | Anthropic | $4,000.00 | $1,750.00 | $5,750.00 | 0.8% |
Retrieved passages often make input substantially larger than output, which changes the value of cached-input pricing and context trimming.
Estimate boundary: The calculation covers tracked text-token rates only and does not include vector database, embedding, reranking, or storage charges.
OpenAI model pricingHigh confidenceChecked 2026-07-13
Tracked prices for included OpenAI models are checked against official provider documentation.
Anthropic model pricingHigh confidenceChecked 2026-07-12
Tracked prices for included Anthropic models are checked against official provider documentation.
Google model pricingHigh confidenceChecked 2026-07-14
Tracked prices for included Google models are checked against official provider documentation.
DeepSeek model pricingHigh confidenceChecked 2026-07-12
Tracked prices for included DeepSeek models are checked against official provider documentation.
Anthropic model pricingHigh confidenceChecked 2026-07-14
Tracked prices for included Anthropic models are checked against official provider documentation.