Long-context pricing: when longer prompts cost more
A 1M-token context window is only useful if you can afford to fill it. Some providers raise the price once a prompt passes a threshold, others do not. This page lists each provider's rule from its own pricing page and prices one 300,000-token prompt on each. Use the context window table for model limits and the cost calculator for your own sizes; the topic is AI costs and pricing.
Prices last verified against official provider pages on . How we verify prices. Written by the Chelure Enterprises Editorial Team.
The rules
| Provider and model | Threshold | What changes | Whole request or excess only |
|---|---|---|---|
| OpenAI GPT models | Over 272K input tokens | Input 2x, cached input 2x, output 1.5x (derived from the tables, for example GPT-6 Astra $10 to $20 input and $50 to $75 output) | Not stated |
| Anthropic Claude (4.6 and later except Haiku 5.5) | None | Full 1M window at standard price | Not applicable |
| Anthropic Claude Haiku 5.5 | Over 100,000 prompt tokens | $0.10 to $0.50 input and $0.50 to $2.50 output per million | Each request priced on its own; the higher prices apply to the request |
| Google Gemini 3.1 Pro Preview | Over 200K tokens | Input $2 to $4, output $12 to $18, cached $0.20 to $0.40 per million | Not stated |
| xAI Grok 4.x | 200K tokens or more | Every rate doubles (for example grok-4.7 input $2 to $4, output $6 to $12) | All tokens in the request |
One 300,000-token prompt, priced
A single request with a 300,000-token prompt and a 1,000-token reply. The first price column uses the short-context rates; the second uses the rate that applies at 300K tokens. All arithmetic is ours from the prices above.
| Model | Request | At short-context rates | At 300K-token rates | Rule applied |
|---|---|---|---|---|
| GPT-6 Astra | 300K input | $3.05 | $6.08 | Input 2x, output 1.5x above 272K input tokens (derived from OpenAI's tables; whole-request scope not stated) |
| Claude Sonnet 5.5 | 300K input | $0.61 | $0.61 | No surcharge: Claude 4.6 and later (except Haiku 5.5) include the full 1M window at standard pricing |
| Claude Haiku 5.5 | 300K input | $0.030 | $0.152 | Whole request billed at the higher rates above 100K tokens, counting cache reads and writes |
| Gemini 3.1 Pro Preview | 300K input | $0.612 | $1.22 | Higher rates above 200K tokens; Google does not say whether they apply to the whole prompt, so this assumes they do |
| Grok 4.7 | 300K input | $0.606 | $1.21 | Whole request billed at the higher rate for all tokens once the prompt reaches 200K |
The surcharge is largest for OpenAI and for Haiku 5.5 (five times its short-prompt price), and absent for Sonnet 5.5, which makes a 300K-token prompt on Sonnet cost about $0.61. If you send long prompts repeatedly, prompt caching reduces the input side, but check how each provider applies the tier to cached tokens: Anthropic counts cache reads and writes toward Haiku's 100,000-token threshold.
Planning around it
- Check where your prompts sit. A prompt of 190K tokens on Gemini 3.1 Pro pays the standard rate; at 210K it pays the higher one.
- Retrieve rather than stuff. Sending only relevant passages usually costs less than filling the window.
- Combine with batch for jobs that can wait; see batch API pricing.
Frequently asked questions
What is long-context pricing?
Some providers raise the price per token when a prompt is longer than a threshold: 100K tokens for Claude Haiku 5.5, 200K for Gemini 3.1 Pro and Grok, and 272K input tokens for OpenAI's GPT models.
Does the higher price apply to the whole prompt?
For xAI, yes: its page says requests that reach the threshold are billed at the higher rate for all tokens in the request. For Claude Haiku 5.5, Anthropic says a request whose prompt is over 100,000 tokens pays the higher prices. Google and OpenAI do not say on the pages we read.
Does Claude charge extra for long prompts?
Not for most models. Anthropic says Claude 4.6 and later models (except Claude Haiku 5.5) include the full 1M-token context window at standard pricing: a 900K-token request is billed at the same per-token rate as a 9K-token request.
Do batch and caching discounts apply?
Anthropic says caching and batch discounts apply at standard rates across the full context window. OpenAI's batch rates for long context are half its standard long-context rates, and Google's Gemini 3.1 Pro batch rates are half the standard rates in each tier.
How can I avoid the surcharge?
Stay under the threshold by trimming or retrieving only relevant passages, split a long document across requests, or use a model that includes the long window at standard pricing.
Sources
- OpenAI: pricing (long-context tiers)
- Anthropic: pricing (long context pricing)
- Google: Gemini API pricing
- xAI: models and pricing
Primary sources opened on November 13, 2026. Prices come from our verified price table (see the methodology).