# GPT-5.2-Codex

> OpenAI's agentic coding model for long-horizon, real-world software engineering.

- Maker: OpenAI
- Line: Codex
- Canonical page: https://ai-tldr.dev/models/gpt-5-2-codex/
- Updated: 2026-06-18

## In short

GPT-5.2-Codex is OpenAI's coding-specialized model in the GPT-5.2 generation, tuned specifically for long-horizon agentic software engineering inside Codex. OpenAI released it on 11 December 2025 as an API-only model. It is a version of GPT-5.2 further optimized for real-world development work — building projects from scratch, feature development, debugging, large-scale refactors and migrations, and code review — rather than general chat.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 400K (max output 128K) | [1] |
| Input price | $1.75 / 1M tokens (cached $0.175) | [2] |
| Output price | $14.00 / 1M tokens | [2] |
| Licence | Proprietary · API only | [1] |
| Released | 11 December 2025 | [3] |
| Parameters | Undisclosed | [1] |
| Knowledge cutoff | Aug 2025 | [1] |

## Sources

1. [Addendum to GPT-5.2 System Card: GPT-5.2-Codex](https://openai.com/index/gpt-5-2-codex-system-card/)
2. [GPT-5.2-Codex — OpenAI API model page](https://developers.openai.com/api/docs/models/gpt-5.2-codex)
3. [Introducing GPT-5.2-Codex](https://openai.com/index/introducing-gpt-5-2-codex/)

## Overview

GPT-5.2-Codex is OpenAI's coding-specialized model in the GPT-5.2 generation, tuned specifically for long-horizon agentic software engineering inside Codex. It is a version of GPT-5.2 further optimized for real-world development work — building projects from scratch, feature development, debugging, large-scale refactors and migrations, and code review — rather than general chat.

OpenAI rolled GPT-5.2-Codex out across all Codex surfaces (the Codex CLI, IDE extensions, web, mobile, and GitHub code reviews) for paid ChatGPT users alongside the December 2025 GPT-5.2 family, with API access following shortly after. The model carries a 400K-token context window and can produce up to 128K output tokens, and it accepts both text and image input so it can read screenshots, technical diagrams, charts, and UI screens shared during a coding session.

Compared with GPT-5.1-Codex, this version improves long-context understanding, reliable tool calling, factuality, and native compaction (it compacts its own context to keep working across very long tasks while staying token-efficient in its reasoning). It also adds stronger performance on large code changes, better behavior in Windows environments, and notably stronger cybersecurity capability. OpenAI reports state-of-the-art results on SWE-Bench Pro and Terminal-Bench 2.0.

## Benchmarks

- SWE-Bench Pro: 56.4% ([source](https://www.digitalapplied.com/blog/gpt-5-2-codex-openai-agentic-coding))
- Terminal-Bench 2.0: 64% ([source](https://www.digitalapplied.com/blog/gpt-5-2-codex-openai-agentic-coding))

## Pricing

- Input: $1.75 / 1M tokens
- Cached input: $0.175 / 1M tokens
- Output: $14.00 / 1M tokens

Source: https://developers.openai.com/api/docs/models/gpt-5.2-codex

## Strengths

- Long-horizon agentic coding with native compaction to keep working across very long tasks
- Reliable tool calling and improved factuality for dependable autonomous runs
- Strong on large-scale code changes such as refactors and migrations
- Vision input — reads screenshots, technical diagrams, charts, and UI screens
- 400K-token context window for reasoning over large codebases

## Best for

- Reach for it for long, independent execution of complex engineering tasks inside Codex (the CLI, IDE, or cloud).
- Reach for it for large-scale refactors and migrations that touch many files across a big codebase.
- Reach for it when an agent needs to interpret UI screenshots or diagrams as part of a coding loop.

## How to access

- [OpenAI API](https://developers.openai.com/api/docs/models/gpt-5.2-codex) — model id `gpt-5.2-codex`
- [OpenRouter](https://openrouter.ai/openai/gpt-5.2-codex) — model id `openai/gpt-5.2-codex`

## Codex versions

- [GPT-5.3-Codex](https://ai-tldr.dev/models/gpt-5-3-codex/) (5 February 2026)
- [GPT-5.3-Codex-Spark](https://ai-tldr.dev/models/gpt-5-3-codex-spark/) (12 February 2026)
- GPT-5.2-Codex (11 December 2025) — this page
- [GPT-5.1-Codex](https://ai-tldr.dev/models/gpt-5-1-codex/) (19 November 2025)
- [GPT-5-Codex](https://ai-tldr.dev/models/gpt-5-codex/) (September 2025)

## FAQ

### What is GPT-5.2-Codex?

GPT-5.2-Codex is OpenAI's coding-specialized version of GPT-5.2, tuned for long-horizon agentic software engineering inside Codex. It is built for real development work — building from scratch, feature development, debugging, large-scale refactors and migrations, and code review — and runs across the Codex CLI, IDE extensions, web, mobile, and GitHub code reviews.

### How much does GPT-5.2-Codex cost?

On the OpenAI API, GPT-5.2-Codex is priced at $1.75 per million input tokens and $14.00 per million output tokens, with cached input at $0.175 per million tokens. It is also available through ChatGPT's paid plans inside the Codex surfaces.

### What is the context window of GPT-5.2-Codex?

GPT-5.2-Codex has a 400K-token context window and can generate up to 128K output tokens. It also uses native compaction to compress its own context, which lets it keep working through very long coding tasks while staying token-efficient.

### Does GPT-5.2-Codex support image input?

Yes. GPT-5.2-Codex accepts both text and image input, so it can interpret screenshots, technical diagrams, charts, and UI screens shared during a coding session. Its knowledge cutoff is August 31, 2025.

## Links

- [Introducing GPT-5.2-Codex](https://openai.com/index/introducing-gpt-5-2-codex/)
- [Addendum to GPT-5.2 System Card: GPT-5.2-Codex](https://openai.com/index/gpt-5-2-codex-system-card/)
- [GPT-5.2-Codex — OpenAI API model page](https://developers.openai.com/api/docs/models/gpt-5.2-codex)
- [GPT-5.2-Codex on OpenRouter](https://openrouter.ai/openai/gpt-5.2-codex)
- [GPT-5.2-Codex enterprise agentic-coding analysis (benchmarks)](https://www.digitalapplied.com/blog/gpt-5-2-codex-openai-agentic-coding)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/gpt-5-2-codex/
