Grok’s context window size depends entirely on which model you call: 500,000 tokens for the flagship Grok 4.5, 1,000,000 for Grok 4.3, 2,000,000 across the entire Grok 4.20 family, and 256,000 for the Grok Build coding model. xAI doesn’t ship one number. It ships a lineup, and mixing up two adjacent model names is the easiest way to get the wrong figure.
The Full Lineup, Model by Model

Six model tiers are active right now under SpaceXAI’s developer docs.
| Model | Context Window | Input ($/1M) | Output ($/1M) |
|---|---|---|---|
| Grok 4.5 (flagship) | 500,000 tokens | $2.00 | $6.00 |
| Grok 4.3 | 1,000,000 tokens | $1.25 | $2.50 |
| Grok 4.20 (reasoning) | 2,000,000 tokens | $1.25–$2.00* | $2.50–$6.00* |
| Grok 4.20 (non-reasoning) | 2,000,000 tokens | $1.25–$2.00* | $2.50–$6.00* |
| Grok 4.20 (multi-agent) | 2,000,000 tokens | $1.25 | $2.50 |
| Grok Build 0.1 | 256,000 tokens | $1.00 | $2.00 |
*Trackers disagree on the reasoning and non-reasoning 4.20 variants: some list $1.25/$2.50, others list $2/$6. The multi-agent price holds steady across sources. Check xAI’s own model docs before you budget a production workload around either figure.
Two million tokens works out to roughly 1.5 million words. That’s enough for a codebase’s full commit history, not just its current state.
Grok 4.20 Runs 2 Million Tokens, Not 1 Million
Every variant of Grok 4.20 (reasoning, non-reasoning, and multi-agent) carries a 2 million token window. xAI’s own multi-agent documentation states it directly, and OpenRouter’s live pricing feed confirms the same figure.
That number gets swapped with Grok 4.3 constantly. Grok 4.3 really does cap at 1 million tokens. It launched a few months after Grok 4.20 and sits right next to it in most comparison charts, which is exactly how the mix-up spreads. The 2M figure has held steady since Grok 4.20’s beta rollout, despite the confusion around it.
If your workload needs the largest window xAI currently ships, point your API calls at Grok 4.20’s multi-agent variant rather than Grok 4.3.
Grok 4.5 Trades Window Size for Coding Focus
xAI launched Grok 4.5 on July 8, 2026 as its coding and agentic flagship, and capped it at 500,000 tokens on purpose. That’s plenty of room for a mid-sized repository in one pass, which is what the model was actually built and benchmarked around.
xAI’s developer docs now carry the SpaceXAI brand following SpaceX’s acquisition of xAI. Grok 4.5 trained on real Cursor developer sessions rather than a generic scale-up from Grok 4.3, and that focus shows up directly in the sizing decision.

There’s a cost cliff worth flagging too. Cross roughly 200,000 tokens in a single prompt and Grok 4.5’s rate jumps from $2/$6 to $4/$12 per million tokens. A smaller, well-scoped prompt paired with retrieval usually beats stuffing the window just because the ceiling allows it.
Grok 4.1 Fast Is the Real Source of the 2-Million Confusion
Grok 4.1 Fast shipped in November 2025 with a 2 million token window, and for months it genuinely was xAI’s largest-context model. xAI deprecated it on May 15, 2026. Full retirement lands August 15, 2026, and after that date the model ID stops resolving.
xAI retired grok-4-0709 in that same May 15 wave, alongside several other legacy Grok 4 variants. If your integration still points at either model, migrate the call now rather than waiting for the deadline.
Some pages published only weeks ago still list Grok 4.1 Fast as a live budget option. If a “Grok has 2 million tokens” claim shows up without a specific model name attached, check the publish date before trusting it.
What the Context Window Doesn’t Tell You
A token ceiling measures input capacity. It says nothing about how the model handles what’s inside that window.
Vision input eats into it fast. A single 512×512 image runs roughly 1,600 tokens, so a handful of screenshots in an agentic coding session can quietly consume a meaningful slice of even a 2M window.
Output has its own separate cap, and it’s smaller than the context window across every tier. Playground defaults sit well below the full input ceiling, so a request that reads fine but returns truncated needs its max output tokens raised explicitly, not its context window.
Throughput drops as reasoning effort rises. Grok 4.20’s non-reasoning mode pushes over 200 tokens per second; Grok 4.5 runs closer to a tenth of that once high reasoning effort kicks in by default. A bigger window costs more time to fill, not just more money.
Caching Is Where the Real Savings Live

Long-context requests get expensive fast without caching. xAI’s API accepts a prompt_cache_key header on repeat calls that share a system prompt or a large document, and cached input tokens bill at a steep discount over fresh ones.
curl https://api.x.ai/v1/responses \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "grok-4.5", "prompt_cache_key": "repo-review-session-4", "input": "..."}'For a coding agent that re-sends the same file tree on every turn, that key is the difference between a workable per-session cost and a bill that scales with every message. The exact discount tiers vary by model and are worth checking against xAI’s pricing breakdown before estimating a monthly spend.
Retrieval Quality Doesn’t Scale With Window Size
This is the industry’s well-documented “lost in the middle” problem. Content buried in the center of a long prompt is generally harder for a model to retrieve accurately than content near the start or the end, regardless of how large the stated window is.
xAI’s docs describe a context-compaction feature for trimming older turns in long sessions. Grok Build 0.1 leans on exactly that: it caps at 256K tokens on its own, then hands a session off to a larger-window model once a repository outgrows it.
Every Provider’s Context Window Number Depends on Which Page You Trust
Pull five recent sources on a competing model’s current context window and at least one will disagree with the rest. A number that shows up at one size on one tracker turns up different somewhere else, published the same week.
What xAI’s own documentation confirms: 2 million tokens is the largest active tier, running across the full Grok 4.20 family. Grok 4.3 sits at 1 million, and the flagship Grok 4.5 sits at 500,000. Context size is only one piece of how Grok stacks up against ChatGPT; reasoning quality and tool use matter just as much for most workloads.
Free Tier Doesn’t Get You Near These Limits
Grok’s consumer chat app offers free access, but it’s capped and rate-limited well below any figure in the table above. Every window discussed here, from 256K through 2M, requires paid API access billed per token.
FAQs
Q. What is Grok AI’s current context window size in 2026?
Grok AI’s context window size depends on the model. Grok 4.5 supports 500,000 tokens, Grok 4.3 supports 1 million tokens, Grok 4.20 (all variants) supports 2 million tokens, and Grok Build supports 256,000 tokens. The largest active Grok AI context window is 2 million tokens.
Q. Which Grok AI model has the largest context window?
The Grok 4.20 family has the largest context window. Its reasoning, non-reasoning, and multi-agent variants all support 2 million tokens, making Grok 4.20 xAI’s highest-capacity model for long documents, large codebases, and complex agent workflows.
Q. Did Grok 4.20 get reduced to a 1 million token context window?
No. Grok 4.20 still supports a 2 million token context window. The 1 million token limit belongs to Grok 4.3, which is a separate model. The confusion comes from their similar names and release timeline.
Q. Why does Grok 4.5 have a smaller context window than Grok 4.3?
Grok 4.5 prioritizes coding and agent performance over raw context size. Its 500,000-token window is designed to handle large software projects efficiently while maintaining strong reasoning and tool use, rather than maximizing the token limit.
Q. Does a larger Grok AI context window improve answer quality?
Not necessarily. A larger context window lets Grok process more text in one request, but it doesn’t guarantee better answers. Prompt quality, retrieval, reasoning ability, and tool usage usually have a greater impact on response accuracy.
Q. Does Grok API context caching reduce token costs?
Yes. Using a prompt_cache_key allows Grok to reuse previously processed prompts or documents. Cached input tokens are billed at a lower rate than new input tokens, which can significantly reduce API costs for repeated workflows.
Q. Can you use a 2 million token context window on Grok’s free plan?
No. Grok’s free consumer chat is rate-limited and doesn’t provide the full 256K to 2 million token context windows available through the API. Access to the largest context windows requires paid API usage.
Q. What happens when Grok 4.1 Fast is retired?
After August 15, 2026, Grok 4.1 Fast will no longer accept API requests. Existing integrations should migrate to Grok 4.3 or the Grok 4.20 family, depending on whether they prioritize lower cost, faster performance, or the largest available context window.
Related: Broken Keyboard Grok Answer (2026): Why Your Code Fails
| Disclaimer: We do our best to keep this article accurate and up to date. However, model features, token limits, pricing, and availability may change over time. We recommend double-checking the latest information through official xAI documentation before making technical or purchasing decisions. We are not affiliated with or endorsed by xAI. |
