What a context window actually is
The context window is the maximum number of tokens a model can process in a single request — your input plus the model's response, and on reasoning models the hidden thinking too. A 500K-token window holds roughly 375,000 English words at once. Exceed the window and the API returns an error or truncates; it does not silently round down (DeepSeek, for instance, returns a 400 error past its 1M-token window rather than truncating).
Windows grew from thousands to millions of tokens in a few years. That growth made whole-codebase agents and full-document Q&A possible — and it created a new billing dimension, because providers charge different rates once your prompt crosses their long-context threshold.
The long-context trap: one threshold, whole request re-priced
The pricing rule that surprises people: when a request crosses the long-context threshold, the higher band typically applies to every token in that request, not just the tokens past the line. A 199K-token prompt and a 201K-token prompt can have meaningfully different bills.
| Model | Context window | Long-context rule | Rate jump |
|---|---|---|---|
| Grok 4.7docs.x.ai release notes, Sept 21 2026 | 500K | Prompts of 200K+ tokens bill the whole request at the long rate | $2/$6 → $4/$12 (cached input $0.50 → $1.00) |
| GPT-6 AstraOpenAI API pricing, Oct 2026 | 1M | Short vs long context bands; whole request billed at long rates past the threshold | $10/$50 → $20/$75 (cached $1 → $2) |
| GPT-6.1 SolOpenAI API pricing, Oct 2026 | 1M | Same band structure; band edge at 272K input tokens per OpenAI's long-context rule | $2/$10 → $4/$15 (cached $0.10 → $0.20) |
| GPT-6 LunaOpenAI API pricing, Oct 2026 | 1M | Same band structure | $0.10/$0.50 → $0.20/$0.75 |
| DeepSeek V4.1 FlashDeepSeek API pricing, Oct 2026 | 1M | Flat rates across the full window — no long-context surcharge | $0.15/$0.60 off-peak, no step-up |
The table reveals the market's two philosophies. OpenAI and xAI make long context a premium band — roughly 2× input, 1.5–2× output. DeepSeek charges flat rates across its entire 1M-token window, which is a large part of why it is the default for bulk long-document work (see our DeepSeek pricing guide).
What the band edge does to a real job
Take a 300K-input / 30K-output agent run, where the prompt crosses into the long band:
GPT-6.1 Sol (long band): 0.3 × $4 + 0.03 × $15 = $1.65
DeepSeek V4.1 Flash (flat, off-peak): 0.3 × $0.15 + 0.03 × $0.60 = $0.063
The same 330K tokens costs $1.56 on one rate card and six cents on another. This is why context-heavy workloads are the first place to shop providers — not the model's headline capability.
Four ways to stay out of the expensive band
- Chunk and retrieve. Send the 5K tokens of relevant retrieved chunks, not the 500K-token document. Retrieval-augmented generation exists partly to dodge long-context pricing.
- Summarize progressively. Compress conversation history and agent scratchpads as the run grows, instead of appending raw transcripts.
- Keep the reusable prefix first. Stable system prompts and documents at the front maximize prompt cache hits — and on providers with whole-request banding, a cached prefix still counts toward the threshold, so trimming matters too.
- Route long jobs to flat-rate providers. If your workload is inherently long-context, a flat rate card beats a banded one regardless of headline rates.
One more detail worth knowing: cached input still counts toward the band threshold on providers that re-price the whole request. Caching lowers the price of the tokens inside the band — it does not move you to the cheaper band.
Quick answers
What is a context window in simple terms?
The maximum number of tokens a model can handle in one request — input plus output plus any hidden reasoning tokens. Think of it as the model's working memory: a 500K-token window holds roughly 375,000 English words at once, and everything outside the window is invisible to the model.
Does using more of the context window cost more?
You only pay for the tokens you actually send, not the window's full size. But many providers re-price the entire request at higher long-context rates once your prompt crosses their threshold — so the same 300K tokens can cost far more than three 100K-token requests on a banded rate card.
What happens if I exceed the context window?
It depends on the provider. Most return an error rather than silently truncating — DeepSeek, for example, returns a 400 error past its 1M-token window. The safe responses are to chunk your input, summarize conversation history, or switch to a model with a larger window before the request fails.
Which model has the cheapest long context in 2026?
DeepSeek V4.1 Flash charges flat rates ($0.15/$0.60 off-peak) across its full 1M-token window with no long-context surcharge, making it the cheapest long-context option on the rate cards we track. Banded models re-price whole requests past their thresholds, so flat-rate windows win on very long prompts. See our DeepSeek pricing guide.