GPT-5.1 Codex Max
GPT-5.1-Codex-Max is OpenAI’s latest agentic coding model, designed for long-running, high-context software development tasks.
gpt-5.1-codex-maxReleased 4 Dec 2025 (Dec 2025)Pricing
List prices at OpenAI, in US dollars per million tokens.
| Tier | Input / 1M | Output / 1M | |
|---|---|---|---|
| Standard | $1.25 | $10.00 | |
| Cached input 90% off input | $0.125 | 90% off input |
What it costs a month
At OpenAI list prices, 30 days.
- Chat assistant5,000 requests a day, 2K in / 0.5K out, cached$1,024
- RAG over documents2,000 requests a day, 8K in / 0.6K out, cached$690
- Coding agent1,000 requests a day, 40K in / 2K out, cached$1,155
- Overnight batch20,000 requests a day, 4K in / 0.4K out$5,400
Where to run it
2 hosts serve GPT-5.1 Codex Max. The comparison is on blended price, 3 parts input to 1 part output.
| Host | In / out per 1M | Model id | |
|---|---|---|---|
OpenAILab API gpt-5.1-codex-max | $1.25 / $10.00 | gpt-5.1-codex-max | |
Azure OpenAICloud gpt-5.1-codex-max | $1.25 / $10.00 Retires 18 May 2027 | gpt-5.1-codex-max | Retires 18 May 2027 |
ChatGPTSubscription gpt-5.1-codex-max | In the subscription | gpt-5.1-codex-max |
Show 2 more listings: regions, snapshots and variantsHide regional listings
| Azure OpenAI | |||||||
| eu gpt-5.1-codex-max | $1.38 / $11.00 +10% vs headline Retires 18 May 2027 | gpt-5.1-codex-max | Retires 18 May 2027 | ||||
| us gpt-5.1-codex-max | $1.38 / $11.00 +10% vs headline Retires 18 May 2027 | gpt-5.1-codex-max | Retires 18 May 2027 | ||||
Capabilities
Core
- Streaming
- Function calling
- JSON mode
- Structured outputs
Multimodal
- Vision
- Image input
- Audio
- Image generation
- Video
Advanced
- Reasoning
- Tool calling
- MCP
- Prompt caching
- Batch API
- Embeddings
- Takes in
- ImagesTextPDFs
- Produces
- Text
- Features
- Parallel tool callsPDF inputPrompt cachingBuilt-in web search
Cheaper alternatives
Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.
Same model, cheaper host
No host sells it for less than OpenAI.
Smaller OpenAI models
- 42% less
- 51% less
- 87% less
Other frontier labs
- 13% less
- 13% less
- 94% less
- 56% less
Open-weight picks
- 35% less
- 50% less
- 80% less
- 85% less
Call it
Using OpenAI's API.
from openai import OpenAI
client = OpenAI() # reads OPENAI_API_KEY
response = client.responses.create(model="gpt-5.1-codex-max", input="Hello")
print(response.output_text)curl https://api.openai.com/v1/responses \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-5.1-codex-max", "input": "Hello"}'from litellm import completion
response = completion(
model="openai/gpt-5.1-codex-max",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Quick answers
How much does GPT-5.1 Codex Max cost?
On OpenAI, GPT-5.1 Codex Max costs $1.25 per million input tokens and $10.00 per million output tokens. Cached input costs $0.125 per million tokens.
Which APIs offer GPT-5.1 Codex Max?
GPT-5.1 Codex Max runs on 2 APIs: OpenAI and Azure OpenAI.
What is GPT-5.1 Codex Max's context window?
400K tokens, with up to 128K tokens in one reply.
Is GPT-5.1 Codex Max being retired?
Azure OpenAI retires it on 18 May 2027. 1 host keeps serving it.
What are cheaper alternatives to GPT-5.1 Codex Max?
Models that cost less and keep most of what it can do: GPT-6.1 Terra on OpenAI (42% less), Gemini 4 Hydrogen on Google AI Studio (13% less), Grok 4.7 on xAI (13% less) and Qwen4 Max on Alibaba DashScope (35% less). Savings are on a mix of 3 input tokens to 1 output token.
When was GPT-5.1 Codex Max released?
OpenAI released it on 4 Dec 2025.
What is GPT-5.1 Codex Max's API model id?
Use gpt-5.1-codex-max with OpenAI.
Sources
Raw catalog entry for gpt-5.1-codex-max on OpenAI
{
"cache_read_input_token_cost": 1.25e-7,
"deprecation_date": "2026-07-23",
"deprecation_source": "https://developers.openai.com/api/docs/deprecations",
"successor_model": "gpt-5.6-sol",
"input_cost_per_token": 0.00000125,
"litellm_provider": "openai",
"max_input_tokens": 400000,
"max_output_tokens": 128000,
"mode": "responses",
"output_cost_per_token": 0.00001,
"fedramp_uplift_multiplier": 1.1,
"source": "https://developers.openai.com/api/docs/models/gpt-5.1-codex-max",
"supported_endpoints": [
"/v1/responses"
],
"supported_modalities": [
"text",
"image"
],
"supported_output_modalities": [
"text"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_parallel_function_calling": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_web_search": true
}