top of page

Google AI Studio context window 2026: 1M tokens, 65,536-token replies

Nov 4, 2025
7 min read

Updated: Nov 15

Google AI Studio context window 2026 cover with Google logo, Data Studios original cover

Updated: November 15, 2026


Every current Gemini text model in Google AI Studio works with a context window of 1,048,576 tokens, and a standard reply stops at 65,536 tokens. On the Gemini 4 models (Hydrogen, Carbon and Argon) that window is shared by your input, the model's thinking and its answer, while Gemini 3.x and 2.5 models keep a separate budget of 1,048,576 input tokens and 65,536 output tokens. Google's documentation counts a token as about four characters, so a full window holds roughly 630,000 to 840,000 English words.


Memory in AI Studio is limited to the chat you are in. Google's AI Studio quickstart explains that every message between you and the model is included in the prompt each time you send a new one, which is why long chats eventually hit the model's token limit. The sections below list the limits per model, show how text, images and audio consume tokens, explain what is stored and for how long, and work through the cost of a long conversation when the same setup runs through the Gemini API.


··········


⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣

GOOGLE AI STUDIO CONTEXT WINDOW BY GEMINI MODEL.


The figures in the table come from Google's model pages and "What's new" pages for each model, checked on November 15, 2026. The free-tier column refers to the Gemini API tiers that also govern which models a project can call, while using the AI Studio interface itself is free of charge in all available regions, according to Google's pricing page.


........


Model

Model code

Context window

Standard reply limit

Free tier

Gemini 4 Hydrogen

gemini-4-hydrogen

1,048,576 tokens, shared

65,536 tokens

Yes

Gemini 4 Carbon

gemini-4-carbon

1,048,576 tokens, shared

65,536 tokens

No, paid tier

Gemini 4 Argon

gemini-4-argon

1,048,576 tokens, shared

65,536 tokens

No, paid tier

Gemini 3.8 Flash

gemini-3.8-flash

1,048,576 input tokens

65,536 tokens

Yes

Gemini 3.x and 2.5 models

e.g. gemini-3.5-flash-lite, gemini-2.5-pro

1,048,576 input tokens

65,536 tokens

Varies by model


........


The word "shared" changes the arithmetic on Gemini 4. Google states that if your input plus the maximum output you request exceeds 1,048,576 tokens, the output is capped to the space left in the window. A 1,000,000-token prompt sent to Gemini 4 Hydrogen therefore leaves 48,576 tokens for thinking and answer combined, while the same prompt sent to Gemini 3.8 Flash still has its separate 65,536-token output budget.


··········


GEMINI 4 OUTPUT LIMITS, THINKING TOKENS AND LONG DECODE.


On Gemini 4 models, `max_output_tokens` is a hard limit that counts thinking and visible answer together, so a low value can cut a reply off before the model finishes. Google's migration notes for Gemini 4 Argon ask developers who set the limit below 32,768 to raise it to at least that value, because reasoning can take a larger share of the budget than on earlier models.


Thinking depth is set with thinking levels. Gemini 4 Argon and Gemini 4 Carbon offer low, medium and high, with medium as the default. Gemini 4 Hydrogen adds a fourth level, xhigh, and uses high by default. Higher levels usually spend more tokens of the shared window before the answer starts.


Replies longer than 65,536 tokens require long decode, which Google documents for the Gemini API rather than for the AI Studio chat screen. With background execution, the server chains continuation hops of about 64,000 tokens each, up to your `max_output_tokens` and never beyond 1,048,576 tokens minus your input. A synchronous request that asks for more than 65,536 output tokens returns a 400 error. Google bills every token in every hop, including hops that contain only thinking, and an interaction in background mode can run for up to 24 hours.


··········


HOW TEXT, IMAGES, AUDIO AND FILES COUNT AGAINST THE AI STUDIO TOKEN LIMIT.


Uploaded material shares the same window as your typed prompt. Google's token documentation gives these conversion rates for Gemini models:


........


Content

How Google counts it

What fits in 1,048,576 tokens

English text

About 4 characters per token; 100 tokens ≈ 60-80 words

About 630,000-840,000 words

Small image (up to 384 px per side)

258 tokens

About 4,000 images

Larger image

258 tokens per 768 × 768 px tile

Depends on resolution

Audio

32 tokens per second

About 9 hours


........


PDFs and video are converted into tokens as well, but Google's main token page does not give a single per-page or per-second figure that applies to every current model, and it points to separate documents and media-resolution guides. The reliable way to measure a file is the token counter: the `countTokens` method returns the input total before you send a request, and every Gemini API response reports input, output, thinking, cached and tool-use tokens in its usage fields. Our guide to Google AI Studio file upload and reading limits covers the file size caps that apply before tokens are even counted.


··········


[[ADPLUS_300x250_1]]

GOOGLE AI STUDIO MEMORY: WHAT A CHAT REMEMBERS AND WHAT IT FORGETS.


Inside one chat, the model sees the whole conversation because AI Studio resends every earlier message with each new prompt. Each turn therefore costs more tokens than the previous one, and a long session that includes large files can reach the 1,048,576-token limit after a few dozen exchanges. System instructions can be edited after a chat has started, and Google notes that the change applies to later responses, so rerunning a question is the way to see its effect.


Google's AI Studio documentation describes no memory feature that carries facts from one chat into another. A new chat starts with only what you put into it: the system instructions, the files you attach and your prompts. You can save a prompt to work on later and share it with others, and the "Get code" button turns the prompt and its settings into Gemini API code.


When a project moves to the Gemini API, memory becomes a storage setting. The Interactions API stores every interaction by default (`store=true`), and passing `previous_interaction_id` lets the server retrieve the conversation history so your code does not resend it. Tools, system instructions and generation settings are scoped to a single interaction and have to be specified again in each new one. Setting `store=false` turns storage off, which also rules out background execution and `previous_interaction_id`.


........


Stored data

Free tier

Paid tier

Interactions API objects

Retained 1 day

Retained 55 days

Gemini API logs in AI Studio

Not available

55 days by default; 7, 14, 28 or 55 days selectable

Logs saved to a dataset

Not available

Do not expire

Manual deletion

Delete method or AI Studio

Delete method or AI Studio


........


Logging covers Generate Content, batch, streaming and Interactions API calls, but Google excludes requests that contain video, GIFs or PDFs, as well as Imagen, Veo and embedding models. Generate Content logging is on by default only for projects created on or after October 26, 2026; older projects keep their previous setting.


··········


CONTEXT CACHING AND THE COST OF LONG GEMINI CONVERSATIONS.


Because a conversation resends its history, caching decides most of the bill once a chat grows. Gemini 4 models support only implicit caching, which switches on automatically for prompts of at least 4,096 tokens and gives cache hits a 95% discount on input. Explicit caching with `cachedContents` is not available on Gemini 4 models, while supported Gemini 3 and 2.5 models still offer it through the Generate Content API. Gemini 2.5 Flash and 2.5 Pro start implicit caching at 2,048 tokens. In multi-turn Gemini 4 conversations, Google caches the full previous request only when the new request adds at least 2,050 tokens.


The example below uses Gemini 4 Hydrogen's paid-tier prices as Google lists them for the model ($1.50 per 1M input tokens, $0.075 per 1M cached input tokens, $7.50 per 1M output tokens including thinking). The assumed session loads a 400,000-token document, then runs 20 turns with a 1,000-token question and a 2,000-token answer each.


........


Scenario

Input tokens billed

Cost

First turn only

401,000 input, 2,000 output

$0.62

20 turns, no cache hits

8,590,000 input, 40,000 output

$13.19

20 turns, every turn hits the implicit cache

458,000 fresh plus 8,132,000 cached, 40,000 output

$1.60


........


The conversation ends with about 460,000 tokens in context, well inside the window, yet without cache hits the 400,000-token document alone is billed 20 times. Implicit caching is applied automatically and is not guaranteed on every request, so the real cost of a session falls between the two 20-turn figures. In the free AI Studio interface none of this is charged, but the same growth in context still counts toward the project's tokens-per-minute rate limits, which Google applies per project. Prices and limits per tier are covered in our guides to Google AI Studio pricing and Google AI Studio rate limits.


··········


⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁤

HOW TO KEEP LONG GOOGLE AI STUDIO SESSIONS INSIDE THE TOKEN LIMIT.


Start a new chat when the task changes, and carry over a short written summary of the earlier conclusions instead of the full history, because AI Studio has no cross-chat memory that would do this for you. Attach a large document once at the start of a chat rather than pasting excerpts again in later turns, since each paste adds to the context that every following turn resends.


On Gemini 4 models, leave room in the shared window for thinking: a prompt close to 1,000,000 tokens leaves less than 50,000 tokens for reasoning and answer together. Choosing a lower thinking level or a Gemini 3.x model with a separate 65,536-token output budget is the practical fix when replies come back truncated. When moving to the API, check the token count with `countTokens` before sending very large requests and read `total_cached_tokens` in the usage fields to confirm that caching is working. Model-by-model API limits are listed in our page on Gemini API context windows.


··········


GOOGLE AI STUDIO CONTEXT WINDOW AND MEMORY: THE CONFIRMED LIMITS.


Google's documentation confirms a 1,048,576-token window for every current Gemini text model in AI Studio, a 65,536-token ceiling for standard replies, and a shared input-thinking-output budget on the Gemini 4 family that does not exist on Gemini 3.x and 2.5 models. Memory stays inside a single chat, built from messages that are resent on every turn, and only the Gemini API adds server-side conversation storage, kept for 1 day on the free tier and 55 days on the paid tier.


Two areas remain less documented. Google does not publish one per-page token rate for PDFs that applies to every current model, so measuring files with the token counter is safer than estimating them, and long decode beyond 65,536 output tokens is documented for API background execution rather than for the AI Studio chat screen.


··········


FOLLOW US FOR MORE.


·····


DATA STUDIOS


·····


datastudios.org


bottom of page