Guides

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

Change any of these in the calculator: every row below has a link that opens the same scenario for that model.

The short answer

Long-context surcharges

These models bill a 400,200-token prompt at their long-context rate for the whole request:

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)

#ModelTier10 questions, cached10 questions, no cachePer month (100 docs, cached)
1DeepSeek V4.1 Flash DeepSeeksmall$0.17$1.22$16.62Calculator
2GPT-6 Luna OpenAIsmall$0.19$0.82$18.74Calculator
3Gemini 3.1 Flash-Lite Googlesmall$0.22$1.03$22.05Calculator
4Gemini 3.5 Flash-Lite Googlesmall$0.28$1.25$27.86Calculator
5Gemini 2.5 Flash Googlesmall$0.28$1.25$27.86Calculator
6GPT-5.6 Luna OpenAIsmall$0.38$1.64$38.08Calculator
7Claude Haiku 5.5 Anthropicsmall$0.48$2.05$48.10Calculator
8Mistral Large 4 Mistral AI sale priceflagship$0.57$2.76$56.72Calculator
9Gemini 3.8 Flash Google price changes 2027-01-01mid$0.65$3.08$64.65Calculator
10Gemini 3.6 Flash Google price changes 2027-01-01mid$0.65$3.08$64.65Calculator
11DeepSeek V4 Pro DeepSeekflagship$0.77$5.36$76.82Calculator
12Gemini 4 Argon Google price changes 2026-12-01flagship$1.36$8.20$136Calculator
13Claude Sonnet 5.5 Anthropicmid$1.56$8.20$156Calculator
14Claude Sonnet 5 Anthropicmid$1.92$8.20$192Calculator
15Grok 4.20 (Reasoning) xAIreasoning$2.55$10.11$255Calculator
16Grok 4.3 xAImid$2.55$10.11$255Calculator
17Claude Sonnet 4.6 Anthropicmid$2.89$12.31$289Calculator
18GPT-6.1 Sol OpenAImid$3.03$16.31$303Calculator
19Claude Opus 5.5 Anthropicflagship$3.13$16.41$313Calculator
20Gemini 3.1 Pro (Preview) Googleflagship$3.41$16.37$341Calculator
21GPT-6 Sol OpenAImid$3.75$16.31$375Calculator
22GPT-5.6 Terra OpenAImid$3.81$16.37$381Calculator
23Claude Opus 5 Anthropicflagship$4.81$20.51$481Calculator
24Claude Opus 4.8 Anthropicflagship$4.81$20.51$481Calculator
25Grok 4.7 xAIflagship$5.45$16.25$545Calculator
26Claude Fable 5.1 Anthropicflagship$6.92$41.02$692Calculator
27GPT-5.6 Sol OpenAIflagship$7.50$32.62$750Calculator
28GPT-5.5 OpenAIflagship$8.52$40.92$852Calculator
29GPT-6 Astra OpenAIflagship$18.74$81.54$1,874Calculator

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

More guides

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).