GPT-5 context window: 400,000 tokens

GPT-5 has a context window of 400,000 tokens and a maximum output of 128,000 tokens per response. The window caps the input the model can attend to in one request. The output cap is a separate limit on how long a single response can be. Both figures below are verified against OpenAI documentation.

Verified 2026-08-10.

ModelContext window (tokens)Max output (tokens)
GPT-4o128,00016,384
GPT-5400,000128,000
GPT-5.51,000,000
GPT-5.6 Sol1,050,000128,000

Where 400K sits in the lineup

Against GPT-4o, GPT-5 more than triples the window, from 128,000 tokens to 400,000, and raises max output from 16,384 tokens to 128,000. The output change matters as much as the window change. GPT-4o cannot return a long document in one response. GPT-5 can return up to 128,000 tokens, so long rewrites and long structured outputs fit in a single call.

The successor models move the window past a million tokens. GPT-5.5 has a 1,000,000-token window through the API. GPT-5.6 Sol has a 1,050,000-token window with the same 128,000-token output cap as GPT-5. If your prompts already press against 400K, those are the models to evaluate next.

What the window means for cost

Input billing scales with the tokens you send, so the window sets the ceiling on cost per request. GPT-5 is priced at $1.25 per million input tokens and $10.00 per million output tokens, so a request that fills the full 400K window costs $0.50 in input tokens before any output. The successors carry higher rates: GPT-5.5 and GPT-5.6 Sol are both $5.00 in and $30.00 out per million tokens. A bigger window on a higher rate compounds fast, which is worth checking on the OpenAI pricing page before committing a workload.

One caution on filling the window

A prompt that fits is not automatically a prompt that works. Long prompts can degrade retrieval of facts placed in the middle of the window, an effect well documented in long-context evaluations. When accuracy matters at 400K, put the key material near the start or end of the prompt and test at your real prompt length rather than assuming full-window performance.

More OpenAI model details are on the OpenAI overview. For every current model side by side, see the context window comparison.