GPT-5.2-Codex

gpt-5.2-codex · OpenAI

GPT-5.2-Codex is an upgraded version of GPT-5.2, optimized for agentic coding tasks in Codex and similar execution environments. The model is specifically enhanced for code generation, modification, refactoring, and automated execution workflows, enabling more efficient participation in multi-step, tool-driven programming processes. GPT-5.2-Codex supports low, medium, high, and xhigh reasoning effort settings, allowing flexible trade-offs between latency, reasoning depth, and token usage depending on task complexity.

API Pricing

Input$1.75 / 1M tokens
Output$14 / 1M tokens
Cache read$0.175 / 1M tokens

Specifications

Context400K tokens
Modalitiestext, image, PDF
Output modalitiestext
CapabilitiesThinking, Streaming, Tool calling, Web search, Structured outputs, Prompt caching

Frequently asked questions

What is GPT-5.2-Codex?

GPT-5.2-Codex is an upgraded version of GPT-5.2, optimized for agentic coding tasks in Codex and similar execution environments. The model is specifically enhanced for code generation, modification, refactoring, and automated execution workflows, enabling more efficient participation in multi-step, tool-driven programming processes. GPT-5.2-Codex supports low, medium, high, and xhigh reasoning effort settings, allowing flexible trade-offs between latency, reasoning depth, and token usage depending on task complexity.

What is the context length of GPT-5.2-Codex?

GPT-5.2-Codex has a 400,000 token context window.

How much does GPT-5.2-Codex cost?

On AIHubMix, GPT-5.2-Codex costs $1.75 per million input tokens and $14 per million output tokens. Cached input reads are billed at $0.175 per million tokens.

What modalities does GPT-5.2-Codex support?

GPT-5.2-Codex accepts text, image and PDF input. It returns text output.

What capabilities does GPT-5.2-Codex support?

GPT-5.2-Codex supports thinking, function calling and structured outputs. Per-protocol parameter support is listed in the capability table on this page.

How do I call GPT-5.2-Codex via API?

GPT-5.2-Codex is available through the AIHubMix unified API. The API is OpenAI-compatible: point your OpenAI SDK at https://aihubmix.com/v1, use your AIHubMix API key, and set the model name to gpt-5.2-codex — no other code changes needed.

Who created GPT-5.2-Codex?

GPT-5.2-Codex is developed by OpenAI. AIHubMix aggregates it alongside models from other providers behind one API and one bill.

When was GPT-5.2-Codex released?

GPT-5.2-Codex was released on December 11, 2025 by OpenAI.

More models from OpenAI

See all OpenAI models →

GPT 6.2 Astra

by OpenAI

GPT-6.2 Astra is OpenAI’s reasoning model for complex coding, research, and professional…

$8/1M in · $40/1M out
1,050,000 tokens context

GPT 6.2 Sol

by OpenAI

GPT-6.2 Sol is OpenAI’s general-purpose reasoning model for everyday coding, writing, and…

$2/1M in · $10/1M out
1,050,000 tokens context

GPT 6.1 Terra

by OpenAI

GPT-6.1 Terra is OpenAI’s multimodal reasoning model, supporting text and image inputs…

$1/1M in · $5/1M out
1,050,000 tokens context

GPT Image 2.6 Flare

by OpenAI

GPT-Image-2.6 Flare is OpenAI’s image generation and editing model for posters, product…

From $0.005/image

GPT Image 2.6 Sunburst

by OpenAI

GPT-Image-2.6 Sunburst is OpenAI’s image generation and editing model for visual work…

From $0.005/image

GPT 6.1 Sol

by OpenAI

GPT-6.1 Sol is OpenAI's latest model in the GPT-6 series, specifically designed for…

$2/1M in · $10/1M out
1,050,000 tokens context

Use GPT-5.2-Codex via the AIHubMix unified API — one interface for every major LLM.