Skip to content

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)

#ModelContextInput / 1MOutput / 1MContext
1Llama 4 Scout 17B Instruct (US)
Amazon BedrockOpen weights
10,000,000 tokens$0.17$0.6610M
2Pokee-Isaac 28B
NanoGPT
10,000,000 tokens$0.15$1.0010M
3Qwen Long
Alibaba (China)
10,000,000 tokens$0.07$0.2910M
4Qwen Long 10M
NanoGPT
10,000,000 tokens$0.10$0.4110M
5DeepSeek V4.1 Flash Marathon
SubconsciousOpen weights
5,000,000 tokens$0.14$0.285M
6GLM-5.3 Marathon
SubconsciousOpen weights
5,000,000 tokens$1.40$4.405M
7Gemini 2.0 Pro 0205
NanoGPT
2,097,152 tokens$1.99$7.962.1M
8Gemini 2.0 Pro 1206
NanoGPT
2,097,152 tokens$1.26$5.002.1M
9Auto Router
2,000,000 tokens$-1,000,000.00$-1,000,000.002M
10Gemini 1.5 Flash
NanoGPT
2,000,000 tokens$0.07$0.312M
11Grok 4 Fast
ZenMux
2,000,000 tokens$0.20$0.502M
12Grok 4.1 Fast
Ofox
2,000,000 tokens$0.20$0.502M
13Grok 4.1 Fast Non-Reasoning (Azure AI Foundry)
LLM Gateway
2,000,000 tokens$0.20$0.502M
14Grok 4.1 Fast Reasoning (Azure AI Foundry)
LLM Gateway
2,000,000 tokens$0.20$0.502M
15Grok 4.2 Fast
ZenMux
2,000,000 tokens$2.00$6.002M
16Grok 4.2 Fast Non Reasoning
ZenMux
2,000,000 tokens$2.00$6.002M
17Grok 4.20 Beta Non-Reasoning
Vercel AI Gateway
2,000,000 tokens$1.25$2.502M
18Grok 4.20 Beta Non-Reasoning (0309) (xAI)
LLM Gateway
2,000,000 tokens$2.00$6.002M
19Grok 4.20 Beta Reasoning
Vercel AI Gateway
2,000,000 tokens$1.25$2.502M
20Grok 4.20 Beta Reasoning (0309) (xAI)
LLM Gateway
2,000,000 tokens$2.00$6.002M
21Grok 4.20 Multi Agent Beta
Vercel AI Gateway
2,000,000 tokens$1.25$2.502M
22Grok 4.20 Non-Reasoning (Vertex AI (OpenAI-compatible))
LLM Gateway
2,000,000 tokens$1.25$2.502M
23Grok 4.20 Reasoning (Vertex AI (OpenAI-compatible))
LLM Gateway
2,000,000 tokens$1.25$2.502M
24grok-4-1-fast-non-reasoning
302.AI
2,000,000 tokens$0.20$0.502M
25grok-4-1-fast-reasoning
302.AI
2,000,000 tokens$0.20$0.502M

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.