AI/TLDR

GPT-5.2-Codex

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

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.

Released2025-12-11
LicenseProprietary
WeightsAPI only
ParametersUndisclosed
Context400K
Max output128K
ArchitectureUndisclosed
Knowledge cutoffAug 2025
ModalitiesText, Vision
StatusGenerally available

Benchmarks

  1. SWE-Bench Pro56.4%
  2. Terminal-Bench 2.064%

Scores on a 0–100 scale (25-point gridlines); higher is better. Each benchmark links to its published source.

Pricing

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

Pricing source ↗

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

ProviderModel ID
OpenAI API ↗gpt-5.2-codex
OpenRouter ↗openai/gpt-5.2-codex

Codex — every version

The full lineage of the Codex line, newest first. Every version has its own page — click any to compare specs, benchmarks and pricing.

VersionReleasedContextLicense
GPT-5.3-Codexcurrent2026-02-05Proprietary
GPT-5.3-Codex-Spark2026-02-12Proprietary
GPT-5.2-Codex2025-12-11Proprietary
GPT-5.1-Codex2025-11-19Proprietary
GPT-5-Codex2025-09Proprietary

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.