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 1.5 Flash for the current assumptions
Lowest cost does not mean best model. Test output quality, latency, retries, and reliability on your own workload.
Comparing 45 models that fit the initial input length.
| Model | Provider | Input cost | Output cost | Monthly estimate | Context usage |
|---|---|---|---|---|---|
| Gemini 1.5 Flash | $23.25 | $10.50 | $33.75 | 0.8% | |
| GPT-OSS 20B on Groq | Groq | $25.44 | $10.50 | $35.94 | 6.1% |
| 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% |
| Llama 4 Scout on Groq | Groq | $44.00 | $11.90 | $55.90 | 6.1% |
| GPT-4o mini | OpenAI | $51.00 | $21.00 | $72.00 | 6.3% |
| GPT-OSS 120B on Groq | Groq | $51.00 | $21.00 | $72.00 | 6.1% |
| Command R 08-2024 | Cohere | $60.00 | $21.00 | $81.00 | 6.3% |
| GPT-5.6 Luna | OpenAI | $58.40 | $42.00 | $100.40 | 0.8% |
| 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% | |
| Qwen3-32B on Groq | Groq | $116.00 | $20.65 | $136.65 | 6.1% |
| 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.5 Flash-Lite | $87.60 | $87.50 | $175.10 | 0.8% | |
| Gemini 3 Flash Preview | $146.00 | $105.00 | $251.00 | 0.8% | |
| Gemini 3.6 Flash | $219.00 | $131.25 | $350.25 | 0.8% | |
| Gemini 3.7 Flash | $219.00 | $131.25 | $350.25 | 0.8% | |
| Gemini 3.8 Flash | $219.00 | $131.25 | $350.25 | 0.8% | |
| gpt-5.4-mini | OpenAI | $219.00 | $157.50 | $376.50 | 2.0% |
| Kimi K2.6 | Moonshot AI | $285.20 | $140.00 | $425.20 | 3.1% |
| Kimi K2.7 Code | Moonshot AI | $288.80 | $140.00 | $428.80 | 3.1% |
| Claude Haiku 4.5 | Anthropic | $292.00 | $175.00 | $467.00 | 4.0% |
| Gemini 1.5 Pro | $500.00 | $175.00 | $675.00 | 0.4% | |
| Mistral Medium 3.5 | Mistral | $438.00 | $262.50 | $700.50 | 3.1% |
| Gemini 2.5 Pro | $365.00 | $350.00 | $715.00 | 0.8% | |
| Gemini 3.5 Flash | $438.00 | $315.00 | $753.00 | 0.8% | |
| Grok 4.5 | xAI | $620.00 | $210.00 | $830.00 | 1.6% |
| Kimi K2.7 Code High-Speed | Moonshot AI | $577.60 | $280.00 | $857.60 | 3.1% |
| Claude Sonnet 5 | Anthropic | $584.00 | $350.00 | $934.00 | 0.8% |
| GPT-5.6 Terra | OpenAI | $584.00 | $420.00 | $1,004.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% |
| Command R+ 08-2024 | Cohere | $1,000.00 | $350.00 | $1,350.00 | 6.3% |
| Command A | Cohere | $1,000.00 | $350.00 | $1,350.00 | 3.1% |
| Claude Sonnet 4.6 | Anthropic | $876.00 | $525.00 | $1,401.00 | 0.8% |
| Kimi K3 | Moonshot AI | $876.00 | $525.00 | $1,401.00 | 0.8% |
| GPT-5.6 Sol | OpenAI | $1,168.00 | $700.00 | $1,868.00 | 0.8% |
| Claude Opus 4.8 | Anthropic | $1,460.00 | $875.00 | $2,335.00 | 0.8% |
| Claude Opus 5 | Anthropic | $2,000.00 | $875.00 | $2,875.00 | 0.8% |
| Claude Fable 5 | Anthropic | $2,920.00 | $1,750.00 | $4,670.00 | 0.8% |
| Claude Mythos 5 | Anthropic | $2,920.00 | $1,750.00 | $4,670.00 | 0.8% |
| GPT-6 Astra | OpenAI | $2,920.00 | $1,750.00 | $4,670.00 | 0.8% |
| GPT-5.6 Cyber | OpenAI | $3,650.00 | $2,625.00 | $6,275.00 | 2.0% |
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-09-08
Tracked prices for included OpenAI models are checked against official provider documentation.
Anthropic model pricingHigh confidenceChecked 2026-09-08
Tracked prices for included Anthropic models are checked against official provider documentation.
Google model pricingHigh confidenceChecked 2026-09-03
Tracked prices for included Google models are checked against official provider documentation.
DeepSeek model pricingHigh confidenceChecked 2026-08-16
Tracked prices for included DeepSeek models are checked against official provider documentation.
Groq model pricingHigh confidenceChecked 2026-07-15
Tracked prices for included Groq models are checked against official provider documentation.
Groq model pricingHigh confidenceChecked 2026-07-15
Tracked prices for included Groq models are checked against official provider documentation.
Groq model pricingHigh confidenceChecked 2026-07-15
Tracked prices for included Groq models are checked against official provider documentation.
Groq model pricingHigh confidenceChecked 2026-07-15
Tracked prices for included Groq models are checked against official provider documentation.
Google model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Google models are checked against official provider documentation.
Google model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Google models are checked against official provider documentation.
Cohere model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Cohere models are checked against official provider documentation.
Cohere model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Cohere models are checked against official provider documentation.
Cohere model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Cohere models are checked against official provider documentation.
Mistral model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Mistral models are checked against official provider documentation.
Moonshot AI model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Moonshot AI models are checked against official provider documentation.
Moonshot AI model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Moonshot AI models are checked against official provider documentation.
Moonshot AI model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included Moonshot AI models are checked against official provider documentation.
xAI model pricingHigh confidenceChecked 2026-07-17
Tracked prices for included xAI models are checked against official provider documentation.
Anthropic model pricingHigh confidenceChecked 2026-09-08
Tracked prices for included Anthropic models are checked against official provider documentation.
Review the source-tracked provider pages before using this workload estimate in a budget.