GPT-5.1 Codex Max

OpenAIMCP Tool CallReasoning
openai/gpt-5.1-codex-maxClosed API

Coding-optimized GPT model for repository edits, reviews, and agentic software work

Benchmark Pricing$2.50 / 1M in$20.00 / 1M out$0.25 cache read
Context: 400,000 tokens•Max Output: 128,000 tokens•Knowledge: 2024-09-30•Released: 2025-11-13

TECHNICAL SPECIFICATIONS

Context Window400,000400K tokens
Max Output128,000128K tokens
LicenseProprietaryCloud API only
Input Modalities
TextVision
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ GPT-5.1 Codex Max natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 400,000 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

API CALL INVOCATION EXAMPLE

// Example: Calling GPT-5.1 Codex Max via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

const response = await client.chat.completions.create({
  model: "openai/gpt-5.1-codex-max",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

15 providers
NanoGPTopenai/gpt-5.1-codex-max
$2.50 / $20.00$0.25 cache
Vivgridgpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
Poeopenai/gpt-5.1-codex-max
$1.10 / $9.00$0.11 cache
AI/ML APIopenai/gpt-5.1-codex-max
$3.44 / $27.51$0.34 cache
Abacusgpt-5.1-codex-max
$1.25 / $10.00
Vercel AI Gatewayopenai/gpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
OpenCodegpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
Eden AIazure/gpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
Ofoxopenai/gpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
Azure Cognitive Servicesgpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
Kilo Gatewayopenai/gpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
Jiekou.AIgpt-5.1-codex-max
$1.19 / $9.50$0.12 cache
Azuregpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
DigitalOceanopenai-gpt-5.1-codex-max
$1.25 / $10.00$0.13 cache
OpenRouteropenai/gpt-5.1-codex-max
$1.25 / $10.00$0.13 cache

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.25 / 1M tokens, saving up to 90% on repetitive MCP tool definitions and system instructions.

MODEL RESOURCES