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.”
Facts
Specs and prices
| Fact | GPT-5.2-Codex |
|---|---|
| Maker | OpenAI |
| API model id | gpt-5.2-codex |
| Released | December 18, 2025 |
| Status | Previous generation |
| Context window | 400K tokens |
| Max output | 128K tokens |
| Open weights | No |
| 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 in | Codex, 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.
| 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.