Fundamentals

Context Window

The maximum amount of text — measured in tokens — a model can “see” at once, including your prompt and its own reply.

A context window works like short-term memory: anything outside it, the model simply cannot reference, until the conversation is trimmed or summarized. Windows have grown from a few thousand tokens in 2020-era models to over a million tokens in some 2026 frontier models, enabling use cases like reasoning over an entire codebase or an hour-long document in one pass.

Bigger context windows cost more to run per request, since attention computation scales steeply with sequence length in the original Transformer design — one reason providers charge more per token for longer prompts.