Overview
GPT-5-Codex is the first Codex-branded model in OpenAI's GPT-5 generation, announced in September 2025. It is a version of GPT-5 further optimized for agentic coding inside Codex, trained on complex, real-world software engineering work rather than general chat: building full projects from scratch, adding features and tests, debugging, performing large-scale refactors, and conducting code reviews. OpenAI recommends GPT-5-Codex specifically for agentic coding tasks in Codex or Codex-like environments, while keeping GPT-5 as the general-purpose model.
GPT-5-Codex carries a 400K-token context window and can generate up to 128K output tokens, and it accepts both text and image input so it can read screenshots, diagrams, and UI surfaces shared during a coding session. A defining trait is its ability to dynamically scale how long it thinks: it answers quickly on small, interactive requests but can keep working independently for long stretches on large tasks. During OpenAI's testing, GPT-5-Codex worked on its own for more than seven hours at a time on large, complex tasks, iterating on its implementation, fixing test failures, and ultimately delivering a working result.
The model became available to developers on September 23, 2025, through the OpenAI Responses API (model ID gpt-5-codex), in addition to ChatGPT subscriptions. It runs everywhere Codex does — the Codex CLI, IDE extensions, the web, GitHub code review, and the ChatGPT iOS app — and is the default for cloud tasks and code review. On SWE-bench Verified it scores 74.5%, and on OpenAI's internal code-refactoring benchmark it reaches 51.3%, a large jump over the base GPT-5 model's 33.9%.
| Released | 2025-09 |
|---|---|
| License | Proprietary |
| Weights | API only |
| Parameters | Undisclosed |
| Context | 400K |
| Max output | 128K |
| Architecture | Undisclosed |
| Knowledge cutoff | Sep 2024 |
| Modalities | Text, Vision |
| Status | Generally available |
Benchmarks
Scores on a 0–100 scale (25-point gridlines); higher is better. Each benchmark links to its published source.
Pricing
| Input | $1.25 / 1M tokens |
|---|---|
| Cached input | $0.125 / 1M tokens |
| Output | $10.00 / 1M tokens |
Strengths
- Long-horizon agentic coding — worked independently for 7+ hours on large tasks in OpenAI's testing
- Dynamically scales reasoning time: fast on interactive requests, persistent on complex ones
- Strong on large-scale code changes such as refactors, validating with dependency analysis and tests
- Image input — reads screenshots, diagrams, and UI surfaces during a coding session
- 400K-token context window for reasoning over large codebases
- Runs everywhere Codex does: CLI, IDE extension, web, GitHub code review, and the ChatGPT iOS app
Best for
- Reach for it for long, independent execution of complex engineering tasks inside Codex (CLI, IDE, or cloud).
- Reach for it for large-scale refactors and migrations that need planning, dependency analysis, and test runs.
- Reach for it for automated code review on GitHub pull requests.
- Reach for it when a coding agent needs to interpret a UI screenshot or diagram as part of the loop.
How to access
| Provider | Model ID |
|---|---|
| OpenAI API ↗ | gpt-5-codex |
| OpenRouter ↗ | openai/gpt-5-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.
| Version | Released | Context | License |
|---|---|---|---|
| GPT-5.3-Codexcurrent | 2026-02-05 | — | Proprietary |
| GPT-5.3-Codex-Spark | 2026-02-12 | — | Proprietary |
| GPT-5.2-Codex | 2025-12-11 | — | Proprietary |
| GPT-5.1-Codex | 2025-11-19 | — | Proprietary |
| GPT-5-Codex | 2025-09 | — | Proprietary |
FAQ
What is GPT-5-Codex?
GPT-5-Codex is OpenAI's first Codex-branded GPT-5 model, announced in September 2025. It is a version of GPT-5 optimized for agentic coding inside Codex — building projects from scratch, adding features and tests, debugging, large-scale refactors, and code review. OpenAI recommends it specifically for agentic coding in Codex or Codex-like environments.
How much does GPT-5-Codex cost?
On the OpenAI API, GPT-5-Codex is priced at $1.25 per million input tokens and $10.00 per million output tokens, with cached input at $0.125 per million tokens — the same pricing as GPT-5. It is also included with ChatGPT Plus, Pro, Business, Edu, and Enterprise plans inside Codex.
What is the context window of GPT-5-Codex?
GPT-5-Codex has a 400K-token context window and can generate up to 128K output tokens. It accepts both text and image input, and its knowledge cutoff is September 30, 2024.
How does GPT-5-Codex perform on benchmarks?
GPT-5-Codex scores 74.5% on SWE-bench Verified and 51.3% on OpenAI's internal code-refactoring benchmark — a large jump from the base GPT-5 model's 33.9%. In OpenAI's testing it also worked independently for more than seven hours at a time on large, complex tasks.