DEV Community

尚毅段
尚毅段

Posted on Edited on Originally published at aiapicostcalc.com

The context cliff: 200K, 272K, and the line that doubles your prompt bill

Most LLM price tables are read as one number per model. That number is a floor, and the ceiling is printed next to it in smaller type.

Take a 250,000-token prompt. On GPT-6.1 Sol it bills at the standard $2 per 1M input. On Gemini 3.1 Pro the same prompt is over the 200K line, so input doubles to $4. The model hasn't started writing yet and the input side already costs twice as much.

The tier lines don't line up:

Model Standard input / output Over the line Line
Claude Haiku 5.5 $0.10 / $0.50 $0.50 / $2.50 100K
Gemini 3.1 Pro $2 / $12 $4 / $18 200K
Grok 4.3 $1.25 / $2.50 $2.50 / $5 200K
Grok 4.7 $2 / $6 $4 / $12 200K
GPT-6.1 Sol $2 / $10 $4 / $15 272K
GPT-6 Astra $10 / $50 $20 / $75 272K

That leaves a 72,000-token window, from 200K to 272K, where Google and xAI charge their long-context rate and OpenAI doesn't.

Two tokens, 4% to 96%

Run the same request at 199,999 input tokens and 200,001, with 10K output tokens:

  • 199,999 tokens, GPT-6.1 Sol: $0.40 input + $0.10 output = $0.50
  • 199,999 tokens, Gemini 3.1 Pro: $0.40 + $0.12 = $0.52
  • 200,001 tokens, GPT-6.1 Sol: $0.40 + $0.10 = $0.50
  • 200,001 tokens, Gemini 3.1 Pro: $0.80 + $0.18 = $0.98

At the lower count Gemini costs about 4% more. Two tokens later it costs about 96% more, because the whole request moved to the higher rate. Nothing about the workload changed; the prompt crossed a line that only appears in a footnote.

The output side moves too, and not by the same factor. OpenAI's long-context rows are 2x input and 1.5x output. xAI is 2x on both. Haiku 5.5 is 5x on both, and its line is at 100K, which most teams never look at because the model is the cheap one.

Averages hide the step

A blended cost per million tokens is useful for a slide and useless for a budget. Suppose a workload makes 1,000 calls a month at 250K input and 10K output, all of them between the 200K and 272K lines:

Model Per call 1,000 calls
GPT-6.1 Sol $0.60 $600
Grok 4.3 $0.68 $675
Gemini 3.1 Pro $1.18 $1,180
Claude Haiku 5.5 (over its 100K line) $0.15 $150

Two calls in five landing above a threshold is enough to move the monthly number by hundreds of dollars, and the average token price you computed last quarter won't show it.

Cached input makes the gap harder to read. Grok's cached rate goes from $0.50 to $1.00 per 1M at the 200K line. The long-context row for GPT-6 Astra lists $20/$75, a two-number row; if most of your input is cache hits, that row alone doesn't tell you the bill, and the vendor pricing page is the only place to check the cached rate at that tier.

What to measure before you route

  1. Log input tokens per request, not per month. You need p50 and p95, plus a count of calls above each vendor's line. A 5% share of long requests carries closer to 10% of spend, before cache effects.
  2. Check the line for the exact model, not the vendor. Haiku 5.5 steps at 100K; Fable 5.2 has no published tier. Assuming one threshold per provider gets the cheap model wrong.
  3. Price the 200K–272K window twice. For prompts in that band, the tier boundary matters more than the headline price. A route that looks a few percent cheaper at 199K can be 96% more expensive at 200K.
  4. Treat the threshold as a product decision. Summarize, chunk, or drop the 50K tokens that push a request over the line, and the same call may fall back to standard pricing.

One caveat: whether a provider re-prices the whole request or only the tokens above the line is in the API docs, and it has changed before. The table here records the published rate for requests over the threshold. Test one long call against your own usage before building a budget on the multiplication.

The numbers above come from the vendor pricing pages, checked between 2026-11-15 and 2026-11-18. They move: Gemini 4 Carbon is already scheduled to go from $2/$10 to $4/$20 on 2026-12-01.

The full table, with a checked date on every row: AI API price comparison. If you want to price one workload instead of reading rows, the token cost calculator takes input, output, and cache-hit counts. The two models used in the example: GPT-6.1 Sol pricing and Gemini 3.1 Pro pricing.

Top comments (0)