Skip to content
Desmond Achebe

Dec 6, 202616 min read

Most current Gemini API models hold about 1 million tokens at once. Gemini 4 Live holds 128,000.

Gemini context window size by model and plan

The pages checked, which I compared the way anyone wiring up an Activepieces flow would, publish no window at all for the Free, AI Plus or AI Pro app plans.

What a context window is and how tokens count

Add up your prompt, any attached files, the conversation so far and the reply, and you have the window: the total number of tokens a model holds in one request.

A token is a fragment of text, often a short word or part of one, and English averages somewhere near four characters per token.

Fill a 1,048,576-token window and Google bills a million input tokens every time you send it. Ten such runs a day is ten million tokens before you have asked anything clever, so sophisticated queries become unaffordable at this pace. That is where the cost hides.

Current API models and their limits

Per Google AI Studio, Gemini 3.5 Flash-Lite and 4 Hydrogen each take 1,048,576 tokens. A whole codebase or a long contract set fits in one call.

The page lists Gemini 4 Neon and 4 Carbon at 1,048,576, the same as Hydrogen, so size prompts to that limit.

When a voice session runs long or an attachment is large, Gemini 4 Live hits its ceiling first. It stops at 128,000, roughly an eighth of the others, and it's the real-time audio model.

Read the table for what each source states and where it says nothing. Treat "Not published" as a gap to plan around, not as a number that will turn out generous.

Model or plan Context window Max output Published rate limit Source, checked 6 Dec 2026
Gemini 3.8 Flash 1,048,576 tokens Not published Not published Google AI Studio model page
Gemini 3.5 Flash-Lite 1,048,576 tokens Not published Not published Google AI Studio model page
Gemini 4 Live 128,000 tokens Not published Not published Google AI Studio model page
Free Not published Not published Not published gemini.google/subscriptions
AI Plus Not published Not published Not published gemini.google/subscriptions
AI Pro Not published Not published Not published gemini.google/subscriptions

Prices and plan limits checked against docs.claude.com and claude.com and openai.com and gemini.google on December 5, 2026.

Though the API rows give a window, they carry no output cap or rate limit on the page checked, so those limits have to come from your own project's quota screen.

App plans versus the API

On the Free plan, the subscriptions page lists $0 a month with a Google Account and names Gemini 4 Hydrogen as its model, which means anyone can experiment without financial commitment. It gives no window for the app.

Your chat does not get the API's 1,048,576 figure for that model; that number describes the API. If you script long prompts through Activepieces or any other tool, you're on API limits, not subscription limits.

The next step is to read your own tier's page and plan around that number.

Everything below works on Activepieces' free plan. Start without code or a credit card.

Context window depletion in real use

Your upload is not the only thing spending the window. Everything you send and everything the model writes back draws from one shared window, and the figure on your tier's page is spent faster than the size of your upload suggests.

What counts toward the window

Count it all together: chat history, an uploaded PDF, images, an audio or video clip and the reply the model has yet to write are all converted to tokens. Google publishes the token rates for each media type in its Gemini API documentation.

That is the practical point: a video clip isn't a free attachment. It takes space from your text, and the model needs room left over to answer.

Read the container below as a budget. It shows one window filled in that order, with space reserved on the right for the reply. Whatever the earlier blocks consume, the reply gets only the remainder.

A container filled with input blocks and an empty space on the right for the reply

[illustration: one window]

If input plus requested output exceeds the window, the API caps the output limit to the remaining space.

How Gemini chat history uses context tokens

Because the model keeps no memory between turns, each new message sends the full conversation again. Take a chat holding 50,000 tokens of history. Ten more turns means roughly 500,000 input tokens billed, before you count a single new word.

A clerk at a photocopier copying a whole long scroll from the top again, with a tall stack of full copies beside it.

With every turn the cost rises, and the window fills from the left, so the long chat gets both pricier and closer to its ceiling. Starting a fresh chat with a short summary resets both.

Long context versus retrieval

Fitting into the window doesn't mean the model finds what is inside it. In CodingFleet's 1M-token retrieval comparison, Claude Sonnet 4.6 scored 77.8% accuracy, Claude Opus 4.6 76% and GPT-5.5 74%, the best results in that test of older models.

OpenAI provider Models configuration showing pricing and context windows for various GPT models in Activepieces.

That's a usable range, though still a miss roughly one time in four.

Past that range, the rest fall off sharply.

Long-context retrieval accuracy at 1M tokens by model

At that last figure, the model locates the right passage about a quarter of the time, so a million-token paste is closer to a coin you're mostly losing than to a reliable archive.

More than fifty points separate best from worst, and the window size on the box tells you none of it.

For documents you'll query repeatedly, retrieving only the relevant passages into a short prompt is cheaper, because you stop paying to resend material the model can't reliably use.

Reserve the full window for tasks that need everything in view at once, and test recall on your own files before trusting it.

What a long Gemini prompt costs

About $1.20 in input alone is what a single 300K-token prompt to Gemini 3.1 Pro Preview costs, meaning substantial queries carry real per-request costs. Price the tasks that justify the full window before you run them in a loop.

Per-token prices and the long-prompt threshold

According to Macaron, input is $2 per 1M tokens up to 200K tokens and $4 beyond that, doubling your per-token input cost past 200K. Output is $12 per 1M up to the threshold and $18 above it, which means a 50% output markup.

Crossing 200K therefore doubles your input rate and raises output by half, and the higher rate applies to the whole prompt, not just the overflow.

At 190K, a prompt costs $0.38 in input. At 300K it costs $1.20, more than three times as much for about 58% more text. Trimming 100K tokens to get under the line is often worth more than any other optimisation.

Two baskets side by side.

Read the cost column first in the table below, which compares the four ways of sending that 300K prompt. Only the plain row is a fixed figure, and the other rows are cheaper by construction.

Mode Input / output per 1M Cost per call at 300K tokens Latency Date checked
Plain long prompt $4 / $18 $1.20 input, plus $0.018 per 1K output tokens Synchronous 2026-12-06
Cached context Reduced rate on cached tokens, storage billed separately Below $1.20 on repeat calls Synchronous 2026-12-06
Batch Discounted rate Below $1.20 Asynchronous, not immediate 2026-12-06
Free tier No charge $0 Synchronous, rate-limited 2026-12-06

Where a row says "below $1.20", the discount on your own pricing page decides the figure, so use that page's number, not mine.

Context caching

When many calls share one large prefix, such as a contract set you question repeatedly, caching pays. You pay full price once to load it, then a reduced rate on each reuse, plus a storage charge for as long as it stays cached.

If you ask only one question per document, caching adds storage cost for nothing. Latency is unchanged.

Batch mode

You submit requests and collect results later, which is the trade batch makes: speed for price. It suits overnight document runs and not anything a person is waiting on.

If a job can tolerate a delay, batch is the cheapest way to run a 300K prompt.

The free tier costs nothing but is rate-limited. Use it to test recall on your own files, then price production runs from the paid rows above.

Easier to see it running than to read about it: set it up free, no card.

Mistakes that waste Gemini's context window

Six errors account for most wasted spend and most surprise failures. Each has a fix you can apply before the next run.

They're assuming the app and the API share a window, ignoring the output cap, stuffing whole documents, resending history, confusing size with rate limits, and skipping the token count.

Don't trust the chart for numbers it can't carry; the window that matters is the one on your tier's page. Each mistake below is a way of planning around the headline instead.

Confusing context size with rate limits

Separate meters, both of them: a big window says how much one request may hold; a rate limit says how much you may send over time.

A prompt that fits comfortably can still return a 429 (the "resource exhausted" error) because your tokens-per-minute or requests-per-day allowance is spent. The window didn't fail, so a larger window won't help.

Separate meters, both of them: a big window says how much one request may hold; a rate limit says how much you may send over time.

To fix it, read the rate-limit page for your tier next to the context figure. On a 429, wait and retry with a growing delay, or trim the prompt so each call consumes less of the per-minute allowance.

If the calls run on a schedule rather than by hand, Activepieces flows can run on schedules, and its structured automation includes retries, so a scheduled Gemini call can be set up to retry when a 429 comes back.

The Google Gemini integration takes your own API key, so the 429 you are pacing against is your tier's.

The integration's source is one of the 751 in packages/integrations/community in the MIT-licensed repo, so how it calls Gemini is code you can read rather than a claim you have to take on trust.

Paying for a bigger window when the real bottleneck is throughput is the costliest version of this error.

Ignoring the output cap

Fill the window with input and you leave little room for the answer; the window's shared between what you send and what comes back, and the model also has its own ceiling on a single reply.

Ask for a long report and the reply stops mid-sentence, yet you still pay for every token generated before the cut.

Check the model's published output limit before designing the job. If you need long output, split the task into sections, one call each, and budget input and output together rather than treating the window as input-only.

Sending everything every time

Two habits live here. The first is pasting whole documents when the question needs three pages.

The second is forgetting that a chat API is stateless: each turn resends the full history, so the cost of a conversation grows cumulatively with every message. Twenty turns means the early turns are billed again and again.

Send only the passages the question needs, summarize old turns instead of carrying them verbatim, and use context caching where your tier offers it for material you reuse.

Before any long run, count the tokens with the API's token-counting call. That single check tells you the input cost before you pay it and shows whether you're near the window, the output cap, or neither.

Automate Gemini calls with Activepieces

Activepieces handles the rate-limit side of Gemini, not the size side. It lets a scheduled job pace and retry its calls so a 429 doesn't kill the run, but it doesn't make the context window any bigger.

OpenAI provider configuration showing selectable AI models with pricing and capabilities filtering

Measuring first and pricing from your own tier's page still decides what each call can hold.

Own API key and chunked input

Every call is billed and limited under your account and your tier, not a shared pool, because your own API key goes into the Google Gemini integration in Activepieces.

That is the point to be clear about: the limits you read on your tier's page are the limits the workflow runs under. Nothing in the builder raises them.

What you can control is how much goes into each call. If a document is larger than your tier comfortably handles, split it into chunks in an earlier step and send each chunk as its own Gemini call, one per loop pass.

Admin dashboard showing AI usage metrics, spending by source, project costs, and AI model usage breakdown with charts and…

Add up the parts and you have the cost of a chunked run. The arithmetic is the same one you did before building: chunk count times tokens per chunk, priced at your model's rate.

One oversized prompt no longer fails the whole job, and that is the advantage. A single chunk that errors can be retried alone, and the chunks that already finished are not paid for twice.

Handling Gemini rate limits with retry and delay

In a different workflow, one that uses the Skyvern integration instead of Gemini, the screenshot below shows the pattern. Step 6 is a "Delay For" step.

Step 7, highlighted, is a Get Workflow/Task Run step with an API Key field, a run ID field pre-filled from the earlier step, and two toggles: "Continue on Failure" and "Retry on Failure".

Activepieces workflow builder showing a Skyvern agent task step with API configuration fields and failure handling options.

Step-level toggles like those appear on the Gemini integration's steps too. The layout to copy is the delay placed ahead of the step that can be refused, with retry switched on for that step.

Read it as a recipe. A delay between chunk calls spreads requests out so you're less likely to hit your per-minute ceiling in the first place.

When the API answers with a 429, Retry on Failure gives a step another attempt instead of ending the run at the first refusal.

Leave "Continue on Failure" off for anything whose output the next step depends on, because a skipped chunk is a silent hole in your result.

What follows from this is a limit on the method itself. If your daily allowance is spent, retries only burn attempts until the window resets. At that point the honest options are a higher tier or a smaller job, not a longer delay.

Frequently asked questions

Does the Gemini app give me the same context window as the API?

Not necessarily: the app and the API are separate products with separate documentation, and a limit on one page doesn't carry over to the other. The model's page in the API docs states the window for API calls.

For the app, the help pages describe what your subscription covers, and they often say less about context.

So if you're planning a job around a specific window, read the page for the surface you'll actually run it on, and note the date you read it.

How do I check how many tokens a prompt uses?

Call the countTokens method before you send the prompt, then compare the result with the context and output limits on the model's page. It costs you a round trip, but it's cheaper than a rejected request.

After the fact, responses to normal calls also report usage metadata, which gives you the real count. Log it per run and you have the cost-per-run figure that the headline window never gives you.

What happens when I go past the Gemini context window?

If a request is oversized, the API rejects it with an error; it doesn't quietly trim your input to fit. That's the better failure, since you know the job didn't run, but it means your pipeline needs to handle the error rather than assume success.

Rate limits are a different failure, and they show up as a 429 response. Treat the two separately: the first needs a smaller prompt, the second needs a pause or a higher tier.

Is the Gemini context window free to use?

The window itself isn't priced separately, but what you put in it is. On the paid API you pay for input tokens, so a long prompt repeated across many calls adds up fast.

There is a free API tier, but its limits are lower and its data terms differ from the paid tier. Read both the limits page and the terms before sending anything sensitive.

If a tier's real cost only becomes clear after talking to sales, treat that as a reason to price it with your own token counts first.

Should I use a long context window or retrieval?

Use retrieval when you ask many questions against the same large body of material, and a long window when the task needs the whole document in view at once. Retrieval sends only the relevant passages, so each call is smaller and cheaper.

Simple to build, a long prompt still costs you on every call. If you do reuse the same long material, check Google's pricing page for context caching, which exists to reduce that repeated cost.

Share

Get started

Automate this without code.

Cloud or your own servers.

Start free Talk to sales