Skip to content

OpenAI

GPT-5.2-Codex: price, context window, and caching

The December 2025 Codex-tuned version of GPT-5.2 for long-horizon agentic coding, refactors, and migrations.

Released December 18, 2025 · Prices as of September 28, 2026

In OpenAI’s words

“Our most intelligent coding model optimized for long-horizon, agentic coding tasks.”

OpenAI docs: GPT-5.2-Codex

What OpenAI says it’s good at

  • Long-horizon work through context compaction Source
  • Large code changes like refactors and migrations Source
  • Better performance in Windows environments Source

Facts

Specs and prices

FactGPT-5.2-Codex
MakerOpenAI
API model idgpt-5.2-codex
ReleasedDecember 18, 2025
StatusPrevious generation
Context window400K tokens
Max output128K tokens
Open weightsNo
Input, per 1M tokens$1.75
Cache hit, per 1M$0.175
Cache write, per 1M$1.75 (same as input)
Output, per 1M tokens$14
Runs inCodex, Cursor, and OpenRouter

Standard API rates in US dollars, as published by the maker on September 28, 2026. Batch and priority tiers, taxes, and subscription plans are not included.

Good to know

  • Removed from Codex for ChatGPT sign-in on April 14, 2026, and retired from GitHub Copilot on June 5, 2026. It remains in the API.
  • It accepts up to 272K input tokens of its 400K context window.

Cost

What typical work costs

Example token counts at GPT-5.2-Codex’s published rates. On the agentic session, caching saves $3.15 against billing every token as ordinary input.

Example workload costs for GPT-5.2-Codex
Agentic coding session, 100K input, 400K written to cache, 2M read from cache, 50K output$1.93
Large one-off review, 150K input with no cache hits, 10K output$0.40
Output-heavy generation, 30K input, 80K output$1.17
A month of sessions, 110 sessions: 5 a day, 22 working days$211.75

Prompt caching

How OpenAI bills cached tokens

OpenAI

Prompt caching is on by default. From GPT-5.6 on you can also mark up to four explicit cache breakpoints, while GPT-5.5 and earlier cache automatically only.

From GPT-5.6 on, a cache write costs 1.25x the uncached input price and a cache hit costs 0.1x. GPT-5.5 and earlier add no charge for writing the cache: written tokens are billed as ordinary input, and a hit costs 0.1x on the models compared here.

On GPT-5.6 and later, a cached prefix stays reusable for at least 30 minutes after its last use, and caching starts at 1,024 input tokens.

Source: OpenAI: Prompt caching

GPT-5.2-Codex compared

  • GPT-5.3-Codex vs GPT-5.2-Codex

    GPT-5.3-Codex and GPT-5.2-Codex cost the same to the cent. What differs is what OpenAI claims for each and where you can still run them in 2026.

Your own numbers

See what GPT-5.2-Codex really costs you.

everyaitoken reads your Codex, Cursor, and OpenRouter history on your Mac and prices every request at API rates, with what caching saved or cost. $9 once.

Launching soonSee the cache math