Cheapest AI model for long-context work

Feeding entire documents, transcripts, or codebases into a single request.

List prices checked

How this is scored

Only models with at least a 200K window, ranked by what one full-context request costs. A million-token window is only useful if you can afford to fill it, so window size and input rate are scored together rather than separately.

All 19, ranked for this workload

#ModelProviderCost for this workloadNotes
1GPT-5 nanoOpenAI$0.02 per full request · 400K windowThe cheapest model OpenAI publishes, intended for classification, routing, and cleanup passes where the task is simple and the volume is enormous.
2CodestralMistral AI$0.08 per full request · 262K windowA code-specialised model tuned for fill-in-the-middle completion, priced for the high request volume that inline editor autocomplete generates.
3GPT-5 miniOpenAI$0.10 per full request · 400K windowA 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.
4Gemini 2.5 Flash-LiteGoogle$0.10 per full request · 1049K windowGoogle'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.
5DeepSeek-V4-FlashDeepSeek$0.14 per full request · 1000K windowA 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.
6Claude Haiku 4.5Anthropic$0.20 per full request · 200K windowThe 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.
7OpenAI o4-miniOpenAI$0.22 per full request · 200K windowCheap 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.
8Gemini 2.5 FlashGoogle$0.31 per full request · 1049K windowThe 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.
9OpenAI o3OpenAI$0.40 per full request · 200K windowA 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.
10GPT-4.1 miniOpenAI$0.42 per full request · 1048K windowThe 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.
11DeepSeek-V4-ProDeepSeek$0.43 per full request · 1000K windowFrontier-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.
12GPT-5OpenAI$0.50 per full request · 400K windowOpenAI'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.
13Claude Sonnet 5Anthropic$0.60 per full request · 200K windowThe 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.
14Cohere Command ACohere$0.64 per full request · 256K windowCohere's enterprise flagship, built around retrieval-augmented generation and multilingual work, and sold heavily as a private deployment inside customer infrastructure.
15Grok 4xAI$0.77 per full request · 256K windowxAI's flagship, priced to match Claude Sonnet exactly, with a large context window and live access to posts on X as a differentiator.
16Claude Opus 5Anthropic$1.00 per full request · 200K windowAnthropic'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.
17Gemini 2.5 ProGoogle$1.31 per full request · 1049K windowA 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.
18Claude Fable 5Anthropic$2.00 per full request · 200K windowAnthropic'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.
19GPT-4.1OpenAI$2.10 per full request · 1048K windowA 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.

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 long-context work in 2026?
GPT-5 nano from OpenAI — $0.02 per full request · 400K window. Codestral is second at $0.08 per full request · 262K window. This ranking is specific to the workload described above; a different usage shape reorders it.
How is this ranking weighted?
Only models with at least a 200K window, ranked by what one full-context request costs. A million-token window is only useful if you can afford to fill it, so window size and input rate are scored together rather than separately.
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