Blog · 2026-07-17 · Vynaris Team
The 200k-token cliff: long-context surcharge math, verified 2026-07-17
Cross 200k tokens on Gemini 3.1 Pro and the whole request re-prices 2x, while Anthropic stays flat across 1M. Per-turn long-context math, verified 2026-07-17.
Cross 200,000 tokens on Gemini 3.1 Pro Preview and the entire request re-prices: input jumps from $2 to $4 per million and output from $12 to $18, a 2x input bill for the same work. Add 2,000 tokens to a 199k prompt and the per-turn cost goes from $0.404 to $0.813. Anthropic does the opposite: a 900k-token request bills at the same per-token rate as a 9k one. Prices verified 2026-07-17 from the provider pages.
TL;DR
- On Gemini 3.1 Pro Preview, a 1.0% token increase across the 200k line (199k to 201k prompt) raises the per-turn cost 2.01x ($0.404 to $0.813), because the whole request re-rates, not just the tokens above the threshold.
- Over a 22-turn agent session that grows from 20k to 272k tokens, the Gemini bill is $9.48 against $6.53 on Claude Sonnet 5 at flat rates (1.45x), and the per-turn cost jumps 2.11x at the single turn that crosses the cliff.
- The surcharge is spreading: OpenAI's GPT-5.6 tiers also carry a long-context rate at 2.0x input and 1.5x output. Anthropic is now the flat-rate exception across the major providers (verified 2026-07-17).
What we computed, and why
Long-context pricing is not a rounding error you discover at scale. It is a step function. Most agent context windows do not start large; they grow. An agent loads a file, appends a tool result, re-reads the diff, and by turn fifteen the prompt it re-sends every step has quietly passed 200,000 tokens. On a flat-rate model nothing happens to the unit price. On a tiered model the request crosses a line and the per-token rate changes for the whole prompt.
We modeled that growth directly: a single agent session where the re-sent context increases each turn, priced on three model families with different long-context policies. The goal is not one true number. It is a transparent skeleton you can re-run with your own token trace. Every figure below comes from a script; nothing was computed by hand.
The pricing rules (verified 2026-07-17)
These are the live rules the model uses. All prices are USD per 1M tokens.
Model Input Output Long-context rule
--------------------------------------------------------------- ------ ------ ------------------------------
Gemini 3.1 Pro Preview (<=200k) $2.00 $12.00 tier by total prompt size
Gemini 3.1 Pro Preview (>200k) $4.00 $18.00 whole request re-rates at 200k
[Gemini 3.5 Flash](https://vynaris.com/models#gemini-3-5-flash) $1.50 $9.00 flat, no length tier
Claude Sonnet 5 (intro to 2026-08-31) $2.00 $10.00 flat across full 1M window
Claude Opus 4.8 $5.00 $25.00 flat across full 1M window
[Claude Fable 5](https://vynaris.com/models#claude-fable-5) $10.00 $50.00 flat across full 1M windowThe load-bearing distinction is one sentence on each pricing page. Google prints separate rows for prompts at or below 200k and prompts above it, and notes that longer prompts incur double the per-token input cost. Anthropic prints the opposite guarantee, word for word: "A 900k-token request is billed at the same per-token rate as a 9k-token request." Gemini 3.5 Flash sits in a third category, cheap and flat, with no length tier at all.
The word that matters in Google's rule is total. The higher rate is not a marginal surcharge on the tokens above 200k. Once the request crosses the threshold, every token in it, including the first 200,000, bills at the higher rate. That is why a 1% increase in size can double the bill.
The assumptions (edit these)
Every value here is an input you can change.
Assumption Value Note
-------------------------------------------------------------------- ------------- ------------------------------------------------
Session start context 20,000 tokens system prompt + first file loads
Context growth per turn 12,000 tokens appended tool results, re-read code, prior turns
Turns in the session 22 ends at 272,000 tokens re-sent on the final turn
[Output tokens](https://vynaris.com/glossary/output-tokens) per turn 500 reasoning summary + tool call, held constant
Cliff crossed at turn 16 prompt reaches 212,000 tokensThe input-to-output ratio is what makes this bite. An agent that re-sends a growing prompt every turn is almost entirely an input workload, so a surcharge that lands on input tokens lands on nearly the whole bill. Chat apps rarely trip the cliff because their prompts stay small. Agents trip it by design.
Results: the cliff, one turn wide
Here is the per-turn cost at fixed prompt sizes, before any caching.
Prompt size Gemini 3.1 Pro Claude Sonnet 5 Claude Opus 4.8
----------- -------------- --------------- ---------------
4,000 $0.0140 $0.0130 $0.0325
32,000 $0.0700 $0.0690 $0.1725
128,000 $0.2620 $0.2610 $0.6525
199,000 $0.4040 $0.4030 $1.0075
201,000 $0.8130 $0.4070 $1.0175
220,000 $0.8890 $0.4450 $1.1125Read the 199,000 and 201,000 rows together. Below the line, Gemini 3.1 Pro and Sonnet 5 are within a tenth of a cent of each other: both charge $2 per million for input. Two thousand tokens later, Gemini has doubled to $0.813 and Sonnet 5 has moved by four tenths of a cent. Same prompt growth, two completely different bills, because one model re-rates the request and the other tracks the token count.

Results: the session bill
A single fixed prompt size is a snapshot. The workload people actually run is a session that grows. Below is the 22-turn session, showing the turns around the cliff.
Turn Prompt Gemini 3.1 Pro Sonnet 5 Opus 4.8
------------- ------- -------------- --------- ----------
0 20,000 $0.0460 $0.0450 $0.1125
15 200,000 $0.4060 $0.4050 $1.0125
16 212,000 $0.8570 $0.4290 $1.0725
21 272,000 $1.0970 $0.5490 $1.3725
Session total *$9.4780* *$6.5340* *$16.3350*The interesting row is 16. Context grew from 200k to 212k, a 6% increase, and the Gemini per-turn cost rose from $0.406 to $0.857, a 2.11x jump. Sonnet 5 rose 5.9%, exactly tracking the token count. From that turn to the end of the session, every Gemini turn carries the surcharge. Across the whole session Gemini costs 1.45x Sonnet 5, and almost all of that gap is created after turn 16.
If you are sizing a real agent budget, this is the moment to plug your own growth curve in: run your per-turn context sizes through the calculator and watch where your session crosses 200k before you commit to a provider.
At 1,000 turns held at a 220k context, the cliff alone (the difference between billing 220k at the sub-200k rate versus the over-200k rate) adds $443 per 1,000 turns, taking Gemini 3.1 Pro from an effective $446 to $889. That $443 buys nothing. It is the same request, the same output, priced by which side of a line the prompt fell on.
It is not only Gemini
Google is the clearest case because it prints the 200k threshold. It is not the only one. OpenAI's GPT-5.6 tiers each carry a short-context and a long-context rate, and the shape is identical to Gemini's.
GPT-5.6 tier Input short Input long Output short Output long
------------ ----------- ---------- ------------ -----------
Sol $5.00 $10.00 $30.00 $45.00
Terra $2.50 $5.00 $15.00 $22.50
Luna $1.00 $2.00 $6.00 $9.00Every tier follows the same rule Gemini does: long-context input is 2.0x the short rate and long-context output is 1.5x. The honest limit on this data: OpenAI's page showed the two-column price but did not print the token count where "long" begins in our 2026-07-17 capture, so we did not put GPT-5.6 in the session math. We can say the surcharge exists and by how much; we cannot yet say precisely where it triggers. That is a real gap, and we would rather flag it than invent a threshold.
The structural point stands either way. Two of the three largest providers price long context at a premium. Anthropic is the one that does not, and its own docs say so in a sentence written to be quoted.
What it means for routing
The context window is now a routing variable, not just a capacity limit.
- Know where your session crosses the line. If your agent's re-sent context lives mostly under 200k, Gemini 3.1 Pro and Sonnet 5 cost nearly the same on input, and Gemini's cheaper output can win. If your context routinely exceeds 200k, the flat-rate model is structurally cheaper on that request, and the gap grows with every turn past the cliff.
- Trim before you cross, not after. Summarizing or dropping stale context to stay under 200k is worth 2x on a Gemini request but close to nothing on a flat-rate one. The value of context right-sizing depends entirely on which model you are on. On a tiered model it is one of the highest-impact changes available.
- Caching does not dodge the cliff. Gemini's cache read price also tiers, from $0.20 to $0.40 per million across 200k, and long-context storage rents at $4.50 per million tokens per hour. Prompt caching still cuts the re-read bill, but the cached tokens are counted toward the total that decides your tier, so a large cached prefix can push you over the line on its own.
An OpenAI-compatible gateway makes this testable without rewriting provider glue: route requests whose context has grown past 200k to a flat-rate model, keep smaller requests on the cheap tiered one, and compare the invoice. That is the model routing case, and long context is one of its cleanest triggers. The same input-heavy math drives what a coding agent costs per task, where the re-sent prefix already dominates before any length tier applies.
Where this model is wrong
Honesty first, because a cost model that hides its failure modes is marketing.
- The threshold is provider-specific and can move. Gemini 3.1 Pro is Preview pricing. We stamp the capture date and re-verify monthly. Treat 200k as today's line, not a permanent one.
- Output was held constant. We fixed output at 500 tokens to isolate the input cliff. A reasoning-heavy turn generates far more output, and on Gemini that output also tiers (12 to 18 dollars), so an output-heavy long-context turn is punished twice. Our numbers are the conservative case.
- Flat is not the same as cheap. Opus 4.8 is flat-rate and the most expensive model in this comparison at every prompt size. Flat pricing removes the cliff risk; it does not make a premium model a budget one. Match the rule to the model to the task.
- Batch and caching change absolute levels. Anthropic's Batch API halves both input and output across the full window. We modeled synchronous, uncached calls to keep the cliff visible. Your effective rate can be lower on both sides; the ratio between tiered and flat is the durable finding.
When does the tiered model still win? When your context genuinely stays small. Gemini 3.1 Pro under 200k has cheap input and, at $12 output, sits below Opus 4.8. For a short-prompt, output-light workload that never approaches the cliff, the tiered model can be the right call. The cliff only bites workloads that grow into it, which is most agents and few chatbots. Pick by the shape of your prompt, not the sticker price. For the caching side of this decision, the prompt-caching break-even math shows exactly when a large cached prefix pays for itself.
FAQ
Why did my Gemini bill double when my prompt barely grew? Gemini 3.1 Pro Preview tiers pricing on total prompt size. Cross 200,000 tokens and the entire request, not just the excess, bills at the higher rate ($4 input, $18 output per million versus $2 and $12). A 1% token increase across that line roughly doubles the input bill.
Does Anthropic charge more for long prompts? No. Anthropic's pricing page states a 900k-token request is billed at the same per-token rate as a 9k-token request, across the full 1M context window (verified 2026-07-17). Prompt caching and batch discounts apply at standard rates the whole way up.
Is the Gemini surcharge only on the tokens above 200k? No, and this is the costly misconception. The higher rate applies to the whole request once it crosses the threshold. There is no marginal band; it is a cliff.
Does prompt caching avoid the long-context tier on Gemini? Not entirely. The cache read price itself tiers ($0.20 to $0.40 per million across 200k), and cached tokens count toward the total that sets your tier. Caching lowers the re-read cost but does not move you back under the line.
Which models are flat-rate across long context? On the Anthropic side, Opus 4.8, Opus 4.7 and 4.6, Sonnet 5, Sonnet 4.6, and Fable 5 include the full 1M window at standard pricing. Gemini 3.5 Flash is flat with no length tier. Gemini 3.1 Pro and OpenAI's GPT-5.6 tiers are the ones that surcharge long context.
Sources
- Google Gemini API pricing, captured 2026-07-17: https://ai.google.dev/gemini-api/docs/pricing
- Anthropic pricing (long-context statement, flat 1M window), captured 2026-07-17: https://platform.claude.com/docs/en/docs/about-claude/pricing
- OpenAI API pricing (GPT-5.6 short/long tiers), captured 2026-07-17: https://developers.openai.com/api/docs/pricing
- Cost model script and reproducible arithmetic: from the assumptions table above.
Prices change. We re-verify every figure in this post monthly and stamp updates. Numbers here are current as of 2026-07-17.
Want the same math on your own workload? Vynaris is an OpenAI-compatible gateway that routes each request to the cheapest right-sized model and shows the per-request cost, including which side of a long-context cliff each call falls on. One base URL swap. Get an API key at vynaris.com.