Long-context document analysis (400K tokens)
Long prompts change the price picture: some providers bill the whole request at a higher rate past a threshold, and caching the document turns follow-up questions from expensive to cheap. Prices verified 2026-10-18.
Assumptions
- A 400,000-token document (roughly a long contract bundle or a mid-size codebase), 200-token question, 2,000-token answer
- 10 questions per document, 100 documents per month
- Cached: the first question writes the document to the cache and the next ones read it. Uncached: every question sends the full document
- Only models whose context window fits the whole prompt and answer are ranked
Change any of these in the calculator: every row below has a link that opens the same scenario for that model.
The short answer
- Cheapest flagship model: Mistral Large 4 at $0.57 (temporary sale price; regular $1.36 / $4.18 per 1M)
- Cheapest mid-tier model: Gemini 3.8 Flash at $0.65 (price rises 2027-01-01)
- Cheapest small model: DeepSeek V4.1 Flash at $0.17
Long-context surcharges
These models bill a 400,200-token prompt at their long-context rate for the whole request:
- GPT-6 Luna: above 272K, input $0.10 → $0.20 and output $0.50 → $0.75 per 1M
- GPT-5.6 Luna: above 272K, input $0.20 → $0.40 and output $1.20 → $1.80 per 1M
- Claude Haiku 5.5: above 100K, input $0.10 → $0.50 and output $0.50 → $2.50 per 1M
- Grok 4.20 (Reasoning): above 200K, input $1.25 → $2.50 and output $2.50 → $5.00 per 1M
- Grok 4.3: above 200K, input $1.25 → $2.50 and output $2.50 → $5.00 per 1M
- GPT-6.1 Sol: above 272K, input $2.00 → $4.00 and output $10.00 → $15.00 per 1M
- Gemini 3.1 Pro (Preview): above 200K, input $2.00 → $4.00 and output $12.00 → $18.00 per 1M
- GPT-6 Sol: above 272K, input $2.00 → $4.00 and output $10.00 → $15.00 per 1M
- GPT-5.6 Terra: above 272K, input $2.00 → $4.00 and output $12.00 → $18.00 per 1M
- Grok 4.7: above 200K, input $2.00 → $4.00 and output $6.00 → $12.00 per 1M
- GPT-5.6 Sol: above 272K, input $4.00 → $8.00 and output $20.00 → $30.00 per 1M
- GPT-5.5: above 272K, input $5.00 → $10.00 and output $30.00 → $45.00 per 1M
- GPT-6 Astra: above 272K, input $10.00 → $20.00 and output $50.00 → $75.00 per 1M
16 of the 29 ranked models publish no long-context tier, so the 400K prompt is billed at their normal rate.
Caching the document
Without caching, every follow-up question pays for all 400,000 document tokens again. With caching, 10 questions on DeepSeek V4.1 Flash cost $0.17 instead of $1.22. How caching is applied differs: some providers cache automatically and do not guarantee a hit, and Google charges an hourly storage fee for explicit caches, which is not included here. Check each model page's billing notes.
Models that do not fit
GPT-5.4 mini (400K), Grok Build 0.1 (256K), Mistral Medium 3.5 (256K), Mistral Small 4 (256K), Ministral 3 8B (256K), Claude Haiku 4.5 (200K), Codestral (128K) have context windows too small for this prompt plus answer.
Trade-offs
Fitting a document in the window is not the same as using it well. Recall of details deep inside very long prompts varies by model; for repeated questions over a large, stable corpus, retrieval (RAG) can be both cheaper and more accurate. Test with questions whose answers sit in the middle of the document.
Full ranking (29 models)
| # | Model | Tier | 10 questions, cached | 10 questions, no cache | Per month (100 docs, cached) | |
|---|---|---|---|---|---|---|
| 1 | DeepSeek V4.1 Flash DeepSeek | small | $0.17 | $1.22 | $16.62 | Calculator |
| 2 | GPT-6 Luna OpenAI | small | $0.19 | $0.82 | $18.74 | Calculator |
| 3 | Gemini 3.1 Flash-Lite Google | small | $0.22 | $1.03 | $22.05 | Calculator |
| 4 | Gemini 3.5 Flash-Lite Google | small | $0.28 | $1.25 | $27.86 | Calculator |
| 5 | Gemini 2.5 Flash Google | small | $0.28 | $1.25 | $27.86 | Calculator |
| 6 | GPT-5.6 Luna OpenAI | small | $0.38 | $1.64 | $38.08 | Calculator |
| 7 | Claude Haiku 5.5 Anthropic | small | $0.48 | $2.05 | $48.10 | Calculator |
| 8 | Mistral Large 4 Mistral AI sale price | flagship | $0.57 | $2.76 | $56.72 | Calculator |
| 9 | Gemini 3.8 Flash Google price changes 2027-01-01 | mid | $0.65 | $3.08 | $64.65 | Calculator |
| 10 | Gemini 3.6 Flash Google price changes 2027-01-01 | mid | $0.65 | $3.08 | $64.65 | Calculator |
| 11 | DeepSeek V4 Pro DeepSeek | flagship | $0.77 | $5.36 | $76.82 | Calculator |
| 12 | Gemini 4 Argon Google price changes 2026-12-01 | flagship | $1.36 | $8.20 | $136 | Calculator |
| 13 | Claude Sonnet 5.5 Anthropic | mid | $1.56 | $8.20 | $156 | Calculator |
| 14 | Claude Sonnet 5 Anthropic | mid | $1.92 | $8.20 | $192 | Calculator |
| 15 | Grok 4.20 (Reasoning) xAI | reasoning | $2.55 | $10.11 | $255 | Calculator |
| 16 | Grok 4.3 xAI | mid | $2.55 | $10.11 | $255 | Calculator |
| 17 | Claude Sonnet 4.6 Anthropic | mid | $2.89 | $12.31 | $289 | Calculator |
| 18 | GPT-6.1 Sol OpenAI | mid | $3.03 | $16.31 | $303 | Calculator |
| 19 | Claude Opus 5.5 Anthropic | flagship | $3.13 | $16.41 | $313 | Calculator |
| 20 | Gemini 3.1 Pro (Preview) Google | flagship | $3.41 | $16.37 | $341 | Calculator |
| 21 | GPT-6 Sol OpenAI | mid | $3.75 | $16.31 | $375 | Calculator |
| 22 | GPT-5.6 Terra OpenAI | mid | $3.81 | $16.37 | $381 | Calculator |
| 23 | Claude Opus 5 Anthropic | flagship | $4.81 | $20.51 | $481 | Calculator |
| 24 | Claude Opus 4.8 Anthropic | flagship | $4.81 | $20.51 | $481 | Calculator |
| 25 | Grok 4.7 xAI | flagship | $5.45 | $16.25 | $545 | Calculator |
| 26 | Claude Fable 5.1 Anthropic | flagship | $6.92 | $41.02 | $692 | Calculator |
| 27 | GPT-5.6 Sol OpenAI | flagship | $7.50 | $32.62 | $750 | Calculator |
| 28 | GPT-5.5 OpenAI | flagship | $8.52 | $40.92 | $852 | Calculator |
| 29 | GPT-6 Astra OpenAI | flagship | $18.74 | $81.54 | $1,874 | Calculator |
USD, standard list prices. Tags mark announced price changes and temporary sale prices.
Price is not quality
This page ranks by cost only. Models differ in accuracy, instruction following, tool use, latency, rate limits and data policies, and those differences often matter more than the price gap. Shortlist two or three models from the table, run them on a sample of your real inputs, and compare cost per successful result.
Related comparisons
- GPT-6 Luna vs Gemini 3.5 Flash-Lite
- GPT-6 Luna vs DeepSeek V4.1 Flash
- Gemini 3.5 Flash-Lite vs DeepSeek V4.1 Flash
- GPT-6 Luna vs Gemini 3.1 Flash-Lite
More guides
- Cheapest LLM for coding agents
- Cheapest LLM for RAG chatbots
- Cheapest LLM for batch classification and extraction
- Cheapest LLM for high-volume customer support
- Prompt caching explained, with savings
FAQ
Which LLM is cheapest for a 400K-token document?
With 10 cached questions per document, DeepSeek V4.1 Flash costs $0.17 per document. Without caching it is $1.22.
Which models charge more for long prompts?
In this data: Claude Haiku 5.5 (above 100K), GPT-6 Astra (above 272K), GPT-6.1 Sol (above 272K), GPT-6 Luna (above 272K), GPT-6 Sol (above 272K), GPT-5.6 Sol (above 272K), GPT-5.6 Terra (above 272K), GPT-5.6 Luna (above 272K), GPT-5.5 (above 272K), Gemini 3.1 Pro (Preview) (above 200K), Grok 4.7 (above 200K), Grok 4.3 (above 200K), Grok 4.20 (Reasoning) (above 200K), Grok Build 0.1 (above 200K).