LLMs with the Longest Context Window
The context window is the maximum number of tokens (prompt plus response) a model can consider in a single request. LLMs with the longest context windows can ingest entire books, large codebases, or long multi-turn conversations at once. The table below ranks models from largest to smallest context window.
Ranked list (top 25)
| # | Model | Context | Input / 1M | Output / 1M | Context |
|---|---|---|---|---|---|
| 1 | Llama 4 Scout 17B Instruct (US) Amazon BedrockOpen weights | 10,000,000 tokens | $0.17 | $0.66 | 10M |
| 2 | Pokee-Isaac 28B NanoGPT | 10,000,000 tokens | $0.15 | $1.00 | 10M |
| 3 | Qwen Long Alibaba (China) | 10,000,000 tokens | $0.07 | $0.29 | 10M |
| 4 | Qwen Long 10M NanoGPT | 10,000,000 tokens | $0.10 | $0.41 | 10M |
| 5 | DeepSeek V4.1 Flash Marathon SubconsciousOpen weights | 5,000,000 tokens | $0.14 | $0.28 | 5M |
| 6 | GLM-5.3 Marathon SubconsciousOpen weights | 5,000,000 tokens | $1.40 | $4.40 | 5M |
| 7 | Gemini 2.0 Pro 0205 NanoGPT | 2,097,152 tokens | $1.99 | $7.96 | 2.1M |
| 8 | Gemini 2.0 Pro 1206 NanoGPT | 2,097,152 tokens | $1.26 | $5.00 | 2.1M |
| 9 | Auto Router | 2,000,000 tokens | $-1,000,000.00 | $-1,000,000.00 | 2M |
| 10 | Gemini 1.5 Flash NanoGPT | 2,000,000 tokens | $0.07 | $0.31 | 2M |
| 11 | Grok 4 Fast ZenMux | 2,000,000 tokens | $0.20 | $0.50 | 2M |
| 12 | Grok 4.1 Fast Ofox | 2,000,000 tokens | $0.20 | $0.50 | 2M |
| 13 | Grok 4.1 Fast Non-Reasoning (Azure AI Foundry) LLM Gateway | 2,000,000 tokens | $0.20 | $0.50 | 2M |
| 14 | Grok 4.1 Fast Reasoning (Azure AI Foundry) LLM Gateway | 2,000,000 tokens | $0.20 | $0.50 | 2M |
| 15 | Grok 4.2 Fast ZenMux | 2,000,000 tokens | $2.00 | $6.00 | 2M |
| 16 | Grok 4.2 Fast Non Reasoning ZenMux | 2,000,000 tokens | $2.00 | $6.00 | 2M |
| 17 | Grok 4.20 Beta Non-Reasoning Vercel AI Gateway | 2,000,000 tokens | $1.25 | $2.50 | 2M |
| 18 | Grok 4.20 Beta Non-Reasoning (0309) (xAI) LLM Gateway | 2,000,000 tokens | $2.00 | $6.00 | 2M |
| 19 | Grok 4.20 Beta Reasoning Vercel AI Gateway | 2,000,000 tokens | $1.25 | $2.50 | 2M |
| 20 | Grok 4.20 Beta Reasoning (0309) (xAI) LLM Gateway | 2,000,000 tokens | $2.00 | $6.00 | 2M |
| 21 | Grok 4.20 Multi Agent Beta Vercel AI Gateway | 2,000,000 tokens | $1.25 | $2.50 | 2M |
| 22 | Grok 4.20 Non-Reasoning (Vertex AI (OpenAI-compatible)) LLM Gateway | 2,000,000 tokens | $1.25 | $2.50 | 2M |
| 23 | Grok 4.20 Reasoning (Vertex AI (OpenAI-compatible)) LLM Gateway | 2,000,000 tokens | $1.25 | $2.50 | 2M |
| 24 | grok-4-1-fast-non-reasoning 302.AI | 2,000,000 tokens | $0.20 | $0.50 | 2M |
| 25 | grok-4-1-fast-reasoning 302.AI | 2,000,000 tokens | $0.20 | $0.50 | 2M |
Prices are per 1M tokens (USD); confirm with the provider. Updated regularly.
More LLM rankings
Frequently asked questions
Which LLM has the longest context window?
Llama 4 Scout 17B Instruct (US) currently leads on context window size in our dataset. Larger windows let you pass more documents or longer histories in one request.
Does a longer context window cost more?
Yes — you pay per token, so filling a large context window increases the per-request cost. Long context is powerful but use it deliberately.
What can I do with a large context window?
Long-context models excel at whole-document analysis, retrieval-augmented generation with many sources, large-codebase reasoning, and long-running conversational agents.