- Best for
- Cheapest AI model for RAG and document search
Cheapest AI model for RAG and document search
Stuffing retrieved passages into a prompt and getting a short grounded answer back.
List prices checked
How this is scored
Scored at 300M input and 15M output tokens per month, with half the input assumed to hit the prompt cache — a realistic figure for RAG, where the system prompt and a working set of documents repeat across requests. That assumption is what separates this ranking from the classification table: models with steep cache discounts move up here and nowhere else. If your retrieval is genuinely random-access, use the classification ranking instead.
All 25, ranked for this workload
| # | Model | Provider | Cost for this workload | Notes |
|---|---|---|---|---|
| 1 | GPT-5 nano | OpenAI | $14/mo · 50% cached | The cheapest model OpenAI publishes, intended for classification, routing, and cleanup passes where the task is simple and the volume is enormous. |
| 2 | Gemini 2.5 Flash-Lite | $25/mo · 50% cached | Google's cheapest model, keeping the full million-token window and multimodal input. Priced to compete directly with GPT-5 nano on high-volume classification work. | |
| 3 | DeepSeek-V4-Flash | DeepSeek | $26/mo · 50% cached | A million-token context window at a fraction of any Western model's price, with cache-hit input billed at a fiftieth of the base rate. DeepSeek has published notice of a significant price rise, so treat these rates as a floor rather than a plan. |
| 4 | Mistral Small | Mistral AI | $35/mo · no cache pricing | An open-weight model available both as a hosted API and as a download, which makes it the cheap tier you can also run yourself if the economics change. |
| 5 | GPT-4o mini | OpenAI | $43/mo · 50% cached | The model that made per-token cost stop mattering for most simple tasks, and the benchmark every subsequent cheap model has been priced against. |
| 6 | Cohere Command R | Cohere | $54/mo · no cache pricing | The cheap end of Cohere's range, aimed at retrieval pipelines where the model's job is to ground an answer in supplied documents rather than to reason from scratch. |
| 7 | GPT-5 mini | OpenAI | $71/mo · 50% cached | A fifth of GPT-5's price with the same 400k context window, which makes it the cheapest way to process very long documents without dropping to a small model. |
| 8 | DeepSeek-V4-Pro | DeepSeek | $79/mo · 50% cached | Frontier-class reasoning at roughly a fifth of Western frontier pricing, with a million-token window. The trade-offs are Chinese data residency, a 500-request concurrency cap, and a price rise the vendor has already announced. |
| 9 | Gemini 2.5 Flash | $94/mo · 50% cached | The best price-to-context ratio on the market: a million tokens of multimodal input for a fraction of what frontier models charge, with optional thinking budgets. | |
| 10 | Grok 3 mini | xAI | $98/mo · no cache pricing | An unusually cheap reasoning model, with output priced below most competitors' input rates — which matters because reasoning models are output-heavy by nature. |
| 11 | GPT-4.1 mini | OpenAI | $99/mo · 50% cached | The million-token context window at a fifth of the price, which is an unusual combination and the main reason this model is still in production stacks. |
| 12 | Codestral | Mistral AI | $104/mo · no cache pricing | A code-specialised model tuned for fill-in-the-middle completion, priced for the high request volume that inline editor autocomplete generates. |
| 13 | Claude Haiku 4.5 | Anthropic | $240/mo · 50% cached | The fast, cheap end of the Claude family, priced at a third of Sonnet while keeping the same context window. Suited to classification, extraction, and high-volume routing. |
| 14 | OpenAI o4-mini | OpenAI | $272/mo · 50% cached | Cheap reasoning, strong on maths and code relative to its price. Same caveat as every reasoning model: budget for the thinking tokens, not just the visible answer. |
| 15 | GPT-5 | OpenAI | $356/mo · 50% cached | OpenAI's flagship, priced aggressively below the other frontier models on input and with a 90% cached-input discount that makes long system prompts nearly free to reuse. |
| 16 | Gemini 2.5 Pro | $384/mo · 50% cached | A million-token context window with native video and audio input, priced at frontier-model rates below 200k tokens and at a higher tier above it — a detail that surprises people modelling long-context costs. | |
| 17 | GPT-4.1 | OpenAI | $495/mo · 50% cached | A million-token context window at a mid-tier price, which remains the reason to reach for it over newer models when the whole codebase has to fit in one request. |
| 18 | OpenAI o3 | OpenAI | $495/mo · 50% cached | A reasoning model that spends tokens thinking before answering. The list price understates the real cost, because reasoning tokens bill as output and can dominate the total. |
| 19 | Mistral Large | Mistral AI | $690/mo · no cache pricing | The French lab's flagship, priced below every US frontier model and hosted in the EU, which is often the deciding factor rather than the benchmark scores. |
| 20 | GPT-4o | OpenAI | $713/mo · 50% cached | The natively multimodal model that set the mid-market price for over a year. Now more expensive than newer models that outperform it, but still the default in a great deal of shipped code. |
| 21 | Claude Sonnet 5 | Anthropic | $720/mo · 50% cached | The workhorse of the Claude family and the default for production work at volume. Introductory pricing of $2/$10 per million tokens runs to 31 August 2026; the $3/$15 standard rate shown here is what applies after that. |
| 22 | Grok 4 | xAI | $788/mo · 50% cached | xAI's flagship, priced to match Claude Sonnet exactly, with a large context window and live access to posts on X as a differentiator. |
| 23 | Cohere Command A | Cohere | $900/mo · no cache pricing | Cohere's enterprise flagship, built around retrieval-augmented generation and multilingual work, and sold heavily as a private deployment inside customer infrastructure. |
| 24 | Claude Opus 5 | Anthropic | $1,200/mo · 50% cached | Anthropic's model for complex agentic coding and enterprise work. Prompt caching cuts repeated input to a tenth of the base rate, which for an agent resending the same context every turn matters more than the headline price. |
| 25 | Claude Fable 5 | Anthropic | $2,400/mo · 50% cached | Anthropic's top model for long-running agentic work, priced at twice Opus 5. Worth it only where a longer autonomous run genuinely replaces human supervision, since the token cost compounds across a multi-hour session. |
Published list prices only. Rows that do not publish a rate for an axis this workload depends on are excluded rather than shown as cheap.
Questions
- Cheapest AI model for RAG and document search in 2026?
- GPT-5 nano from OpenAI — $14/mo · 50% cached. Gemini 2.5 Flash-Lite is second at $25/mo · 50% cached. This ranking is specific to the workload described above; a different usage shape reorders it.
- How is this ranking weighted?
- Scored at 300M input and 15M output tokens per month, with half the input assumed to hit the prompt cache — a realistic figure for RAG, where the system prompt and a working set of documents repeat across requests. That assumption is what separates this ranking from the classification table: models with steep cache discounts move up here and nowhere else. If your retrieval is genuinely random-access, use the classification ranking instead.
- Why does this differ from the general cheapest list?
- Because a single price axis never describes a real workload. Ranking by headline rate answers "who is cheapest per unit"; this page answers "who is cheapest for this job", and the two orders are often very different — which is the whole reason it exists as a separate table.
- What is not accounted for?
- Committed-use discounts, regional price variation, per-request charges, support plans, and minimum retention. These are published list prices applied to one stated workload — a shortlist to price properly with the vendor, not a quotation.
Other workloads
- Cheapest CDN for video streaming
- Cheapest CDN for a small website
- Cheapest cloud storage for backups
- Cheapest object storage for serving files to users
- Cheapest VPS for a side project
- Cheapest cloud compute per vCPU-hour
- Cheapest hosting for bandwidth-heavy sites
- Best free tier for hosting a project
- Cheapest Heroku alternatives