Best LLMs for long documents
Models with a context window of at least 1 million tokens, or that their providers position for long-document work.
A 1M-token window holds roughly 750,000 words: a stack of contracts, several long books or a mid-size codebase in a single request. That makes whole-document analysis possible without building a retrieval pipeline first.
A big window isn't free. You pay for every input token on every call, many providers charge higher rates once a prompt passes a threshold, and accuracy on details buried in the middle of a long prompt varies by model. If you only need a few passages, retrieval (RAG) is usually cheaper and more precise.
The shortlist
| Model | Tier | Weights | Context | Input / 1M | Output / 1M | Inputs |
|---|---|---|---|---|---|---|
| DeepSeek-V4-ProDeepSeek | Frontier | Open weights | 1M | $1.32 | $3.96 | Text |
| GLM-5.3Z.ai (Zhipu AI) | Frontier | Open weights | 1M | $1.40 | $4.40 | Text |
| Qwen3.8-MaxAlibaba (Qwen) | Frontier | Closed | 1M | $2 | $6 | Text, Images |
| Kimi K3Moonshot AI | Frontier | Open weights | 1M | $3 | $15 | Text, Images, Video |
| Claude Opus 5.5Anthropic | Frontier | Closed | 1M | $4 | $20 | Text, Images, PDF |
| Claude Fable 5.1Anthropic | Frontier | Closed | 1M | $10 | $50 | Text, Images, PDF |
| GPT-6 AstraOpenAI | Frontier | Closed | 1.05M | $10 | $50 | Text, Images |
| DeepSeek-V4.1-FlashDeepSeek | Advanced | Open weights | 1M | $0.30 | $1.20 | Text, Images |
| MiniMax-M3MiniMax | Advanced | Open weights | 1M | $0.30 | $1.20 | Text, Images, Video |
| Mistral Large 3Mistral AI | Advanced | Open weights | 256K | $0.50 | $1.50 | Text, Images |
| NVIDIA Nemotron 3 UltraNVIDIA | Advanced | Open weights | 1M | $0.50 | $2.20 | Text |
| Gemini 3.8 FlashGoogle | Advanced | Closed | 1M | $0.75 | $3.75 | Text, Images, Video, Audio, PDF |
| Gemini 3.6 FlashGoogle | Advanced | Closed | 1M | $0.75 | $3.75 | Text, Images, Video, Audio, PDF |
| Claude Sonnet 5.5Anthropic | Advanced | Closed | 1M | $2 | $10 | Text, Images, PDF |
| GPT-6.1 SolOpenAI | Advanced | Closed | 1.05M | $2 | $10 | Text, Images |
| Claude Haiku 5.5Anthropic | Efficient | Closed | 1M | $0.10 | $0.50 | Text, Images, PDF |
| GPT-6 LunaOpenAI | Efficient | Closed | 1.05M | $0.10 | $0.50 | Text, Images |
| GLM-5.3-FlashZ.ai (Zhipu AI) | Efficient | Open weights | 1M | $0.15 | $0.50 | Text, Images, Video |
| Gemini 3.1 Flash-LiteGoogle | Efficient | Closed | 1M | $0.25 | $1.50 | Text, Images, Video, Audio, PDF |
| Gemini 3.5 Flash-LiteGoogle | Efficient | Closed | 1M | $0.30 | $2.50 | Text, Images, Video, Audio, PDF |
| Grok 4.3xAI | Efficient | Closed | 1M | $1.25 | $2.50 | Text, Images |
| Amazon Nova 2 LiteAmazon (AWS) | Efficient | Closed | 1M | — | — | Text, Images, Video, PDF |
| NVIDIA Nemotron 3.5 Lightning 30B-A3BNVIDIA | Compact | Open weights | 1M | $0.05 | $0.20 | Text |
| Mistral Large 4Mistral AI | Frontier | Closed | 1M | $1.36 | $4.18 | Text, Images |
| Gemini 3.1 ProGoogle | Frontier | Closed | 1M | $2 | $12 | Text, Images, Video, Audio, PDF |
| Muse Spark 1.3Meta | Advanced | Closed | 1M | $1.25 | $4.25 | Text, Images, Video, PDF |
| GPT-5.6 SolOpenAI | Frontier | Closed | 1.05M | $4 | $20 | Text, Images |
| Claude Opus 5Anthropic | Frontier | Closed | 1M | $5 | $25 | Text, Images, PDF |
| GPT-5.5OpenAI | Frontier | Closed | 1.05M | $5 | $30 | Text, Images |
| Llama 4 MaverickMeta | Advanced | Open weights | 1M | — | — | Text, Images |
| Llama 4 ScoutMeta | Efficient | Open weights | 10M | $0.10 | $0.30 | Text, Images |
Ordered by status, capability tier and then price. Tiers are our editorial grouping of provider positioning and public benchmark standings, not our own test results. How we rank.
How to choose
- Check the long-context surcharge in each model's price note before you send 500K-token prompts.
- Use prompt caching when you ask many questions about the same document.
- Test recall on your own documents: plant a few facts deep in the text and check that the model finds them.
- Compare against a RAG setup; see RAG explained and context windows explained.
Frequently asked questions
How many pages fit in a 1M-token context window?
Roughly 1,500 pages of plain English text, using the rule of thumb of 0.75 words per token and 500 words per page. Tables, code and non-English text use more tokens per page, so the real number is often lower.
Is long context better than RAG?
For questions that need the whole document, such as summarizing a contract or comparing chapters, long context is simpler. For finding specific facts across a large or changing collection, RAG is usually cheaper, faster and easier to keep current. Many production systems combine both.
Other shortlists
Need hands-on help building it?
RAG, agents, fine-tuning or a production chatbot: describe the project and we'll suggest an approach and, if you want, partners who build it.
- Free and vendor-neutral: no model provider pays for placement.
- Your details go only to partners you agree to.