Gemini 4 context window: how many tokens, and what counts
Short answer: every Gemini 4 model in the Gemini API (Carbon, Neon, Argon, Hydrogen) has a 1M-token context window, exactly 1,048,576 tokens, and it is shared by input, thinking and output. Default max output is 64K; with long decode a model can write up to 1M tokens, minus whatever your input used. In Google Antigravity, Neon is capped at 512K.
Source: Google AI Studio / Gemini API docs, Retrieved 20 November 2026 · Source: Google AI Studio / Gemini API docs, Retrieved 20 November 2026 · Source: Google Antigravity Docs, Checked 20 November 2026
| Model | API model code | Context window | Max output |
|---|---|---|---|
| Gemini 4 Carbon | gemini-4-carbon | 1M (1,048,576) | 64K default / up to 1M with long decode |
| Gemini 4 Neon | gemini-4-neon | 1M (1,048,576) | 64K default / up to 1M with long decode |
| Gemini 4 Argon | gemini-4-argon | 1M (1,048,576) | 64K default / up to 1M with long decode |
| Gemini 4 Hydrogen | gemini-4-hydrogen | 1M (1,048,576) | 64K default / up to 1M with long decode |
| Gemini 4 Neon in Antigravity | — | Up to 512K | — |
What changed from Gemini 3
Google's long-context page: in Gemini 4 “the 1M-token context window is shared across input, thinking, and output tokens… Earlier Gemini 3 and 2.5 models use separate 1M input and 64K output budgets.” If input tokens plus max_output_tokens exceed 1,048,576, the API automatically caps output to what is left.
Source: Google AI Studio / Gemini API docs, Retrieved 20 November 2026
What 1M tokens holds (Google's examples)
- About 50,000 lines of code (80 characters per line)
- 8 average-length English novels
- Transcripts of over 200 average-length podcast episodes
Source: Google AI Studio / Gemini API docs, Retrieved 20 November 2026
Practical notes
- Thinking eats the window. A long prompt at a high thinking level leaves less room for the answer, because thinking tokens share the same 1,048,576.
- Cost grows with every token. Thinking is billed as output. For repeated large inputs, Google points to context caching. See pricing and the cost calculator.
- Put the question last. Google's FAQ: with long context, performance is usually better when the query comes after the material.
- Answers stop at ~64K? That is the default output cap; see errors & limits.
Source: Google AI Studio / Gemini API docs, Retrieved 20 November 2026 · Source: Google AI Studio / Gemini API docs, Retrieved 20 November 2026
Quick answers
What is the Gemini 4 Argon context window?
1M tokens (1,048,576), the same as Carbon, Neon and Hydrogen, per Google's Models page.
Is the Gemini 4 context window 2M?
No. Google lists 1M for all four Gemini 4 models as of 20 Nov 2026.
What about the Gemini app?
This page covers the API and Antigravity. Google's app plans describe limits separately; we haven't found a Gemini 4-specific app context figure on Google's plan pages.
Related Gemini 4 in Antigravity Rate limits Krypton: status Which Gemini 4 model am I getting? Carbon/Argon price from 1 Dec Errors & limits Pricing