impulse

GPT-5.2 Codex

Frontier lab

GPT-5.2-Codex is an upgraded version of GPT-5.1-Codex optimized for software engineering and coding workflows.

API id gpt-5.2-codexReleased 14 Jan 2026 (Jan 2026)
Input / 1M
$1.75
at OpenAI
Output / 1M
$14.00
at OpenAI
Context window
272K
tokens
Max output
128K
tokens per reply
Hosts
2
5 listings
Released
Jan 2026
14 Jan 2026

Pricing

List prices at OpenAI, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$1.75$14.00
Cached input
90% off input
$0.175

What it costs a month

At OpenAI list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out, cached$1,433
  • RAG over documents2,000 requests a day, 8K in / 0.6K out, cached$966
  • Coding agent1,000 requests a day, 40K in / 2K out, cached$1,617
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$7,560
Use your own numbers

Where to run it

2 hosts serve GPT-5.2 Codex. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
OpenAILab API
gpt-5.2-codex
$1.75 / $14.00
gpt-5.2-codex
$1.75 / $14.00
Retires 13 Jul 2027
ChatGPTSubscription
gpt-5.2-codex
In the subscription
Show 2 more listings: regions, snapshots and variants
Azure OpenAI
eu
gpt-5.2-codex
$1.93 / $15.40
+10% vs headline
Retires 13 Jul 2027
us
gpt-5.2-codex
$1.93 / $15.40
+10% vs headline
Retires 13 Jul 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

  • GPT-6.2 Sol
    OpenAI · on OpenAI
    $2.00 / $10.00
    Has every key capability
    17% less
  • GPT-6.1 Terra
    OpenAI · on OpenAI
    $1.00 / $5.00
    Has every key capability
    58% less
  • GPT-5.4 Mini
    OpenAI · on OpenAI
    $0.75 / $4.50
    Has every key capability
    65% less

Other frontier labs

  • Gemini 4 Carbon
    Google · on Google AI Studio
    $2.00 / $10.00
    Has every key capability
    17% less
  • Claude Sonnet 5.5
    Anthropic · on Anthropic
    $2.00 / $10.00
    Has every key capability
    17% less
  • Grok 4.7
    xAI · on xAI
    $2.00 / $6.00
    Has every key capability
    38% less
  • Gemini 4 Argon
    Google · on Google AI Studio
    $2.00 / $10.00
    Has every key capability
    17% less

Open-weight picks

  • Kimi K3.1 Pro
    Moonshot AI · on Databricks
    $2.00 / $10.00
    Has every key capability
    17% less
  • Qwen4 Max
    Alibaba Qwen · on Alibaba DashScope
    $1.50 / $4.50
    Has every key capability
    53% less
  • Inkling
    Independent · on DeepInfra
    $0.95 / $4.05
    Has every key capability
    64% less
  • DeepSeek Flash
    DeepSeek · on DeepSeek
    $0.30 / $1.20
    Has every key capability
    89% less

Model line

Newer and older versions, at each lab's own price.

  1. Feb 2026GPT-5.3 CodexLatest$1.75 / $14.00
  2. Jan 2026GPT-5.2 CodexThis page$1.75 / $14.00
  3. Nov 2025GPT-5.1 Codex$1.25 / $10.00
  4. UndatedGPT-5 Codex$1.25 / $10.00

Call it

Using OpenAI's API.

Python
from openai import OpenAI

client = OpenAI()  # reads OPENAI_API_KEY

response = client.responses.create(model="gpt-5.2-codex", input="Hello")
print(response.output_text)

Quick answers

How much does GPT-5.2 Codex cost?

On OpenAI, GPT-5.2 Codex costs $1.75 per million input tokens and $14.00 per million output tokens. Cached input costs $0.175 per million tokens.

Which APIs offer GPT-5.2 Codex?

GPT-5.2 Codex runs on 2 APIs: OpenAI and Azure OpenAI.

What is GPT-5.2 Codex's context window?

272K tokens, with up to 128K tokens in one reply.

Is GPT-5.2 Codex being retired?

Azure OpenAI retires it on 13 Jul 2027. 1 host keeps serving it.

Is there a newer version of GPT-5.2 Codex?

Yes. GPT-5.3 Codex is the newest model in this line, released on 24 Feb 2026.

What are cheaper alternatives to GPT-5.2 Codex?

Models that cost less and keep most of what it can do: GPT-6.2 Sol on OpenAI (17% less), Gemini 4 Carbon on Google AI Studio (17% less), Claude Sonnet 5.5 on Anthropic (17% less) and Kimi K3.1 Pro on Databricks (17% less). Savings are on a mix of 3 input tokens to 1 output token.

When was GPT-5.2 Codex released?

OpenAI released it on 14 Jan 2026.

What is GPT-5.2 Codex's API model id?

Use gpt-5.2-codex with OpenAI.

Sources

Raw catalog entry for gpt-5.2-codex on OpenAI
{
  "cache_read_input_token_cost": 1.75e-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.00000175,
  "litellm_provider": "openai",
  "max_input_tokens": 272000,
  "max_output_tokens": 128000,
  "mode": "responses",
  "output_cost_per_token": 0.000014,
  "fedramp_uplift_multiplier": 1.1,
  "source": "https://developers.openai.com/api/docs/models/gpt-5.2-codex",
  "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
}