GPT-5.2

GPT-5.2-Codex

by OpenAI · Retired; API access shut down on 2026-07-23

GPT-5.2-Codex was OpenAI’s coding-specialized reasoning model for long-running agentic development tasks. It supported text and image input, text generation, tools, streaming, structured outputs and a 400,000-token context window. Its historical pricing was $1.75 per million input tokens and $14 per million output tokens. The model was deprecated and API access ended on July 23, 2026.

Text Reasoning Coding
GPT-5.2-Codex was a version of GPT-5.2 adapted for extended, tool-assisted coding work rather than short code-generation prompts. OpenAI positioned it for software-engineering tasks that require an agent to inspect a project, reason through changes, use tools and maintain context across a long session. Its large context window and high output limit made it suitable for repository-scale work, although its relatively deliberate speed and eventual retirement are important limitations for anyone evaluating it today.
Outputs

What GPT-5.2-Codex can produce

Text
Inputs

What it can understand

Text Images Multimodal input
Capabilities

Supported features

Tool use Streaming Structured output Prompt caching Batch API
Model profile

Performance characteristics

9/10 Reasoning
10/10 Coding
6/10 Speed
7/10 Cost efficiency
Specifications

Technical details

Model family GPT-5.2
Model type Coding
Context window 400K tokens
Maximum output 128K tokens
Knowledge cutoff 2025-08-31
Release date 2025-12-18
Status Retired; API access shut down on 2026-07-23
Deprecation date 2026-04-22
Shutdown date 2026-07-23
Knowledge cutoff notes

The official model page listed August 31, 2025 as the model's knowledge cutoff. This cutoff applied to the underlying model and was not changed by tools, retrieval or external context.

Model notes

GPT-5.2-Codex was an upgraded GPT-5.2 variant optimized for agentic coding in Codex or similar environments. It supported low, medium, high and xhigh reasoning effort settings, context compaction, function calling, streaming and structured outputs. Standard pricing was $1.75 per 1 million input tokens, $0.175 per 1 million cached input tokens and $14 per 1 million output tokens. OpenAI announced its deprecation on April 22, 2026 and shut down access on July 23, 2026. The model accepted image input but produced text output only. The editorial scores are comparative estimates rather than vendor-provided ratings.

Cost

Model pricing

Input $1.75 per 1 million input tokens
Output $14.00 per 1 million output tokens
Model guide

GPT-5.2-Codex: OpenAI’s Long-Horizon Agentic Coding Model

GPT-5.2-Codex was OpenAI’s coding-optimized reasoning model for long-horizon agentic software engineering. It was designed for large refactors, code migrations, repository-scale changes, Windows development and defensive cybersecurity workflows. The model accepted text and images, produced text, supported tools, streaming and structured outputs, and offered a 400,000-token context window with up to 128,000 output tokens. According to the supplied lifecycle information, it was deprecated on April 22, 2026 and API access ended on July 23, 2026.

What was GPT-5.2-Codex?

GPT-5.2-Codex was OpenAI’s coding-specialized version of GPT-5.2. It was intended for agentic software engineering: workflows in which a model does more than suggest a function or explain an error. An agent can inspect files, plan a change, call tools, apply edits and continue reasoning about the results over an extended task.

The model was aimed at work such as large refactors, migrations between systems, repository-scale changes, terminal-based development, Windows development and defensive cybersecurity. “Long-horizon” means that the task may involve many dependent steps rather than one isolated request. GPT-5.2-Codex’s large context window and support for context compaction were relevant to that use case.

GPT-5.2-Codex was provided by OpenAI and belonged to the GPT-5.2 model family. The supplied lifecycle information identifies December 18, 2025 as its release date. It was later deprecated on April 22, 2026, with API access shut down on July 23, 2026. As a result, its specifications and historical pricing are useful for understanding the model, but it should not be treated as an available choice for new deployments after the shutdown date.

Core specifications and limits

The following are model specifications reported in the supplied OpenAI documentation. They should be distinguished from the editorial scores shown in the research, which are comparative estimates rather than ratings published by OpenAI.

SpecificationGPT-5.2-Codex
Model familyGPT-5.2
Primary typeCoding and agentic software engineering
Context window400,000 tokens
Maximum output128,000 tokens
Reasoning effortLow, medium, high and xhigh settings
Knowledge cutoffAugust 31, 2025
Tool and function supportSupported
StreamingSupported
Structured outputsSupported
Fine-tuningNot supported

A token is a unit of text used to measure the model’s input and output. The 400,000-token context window describes the total working space available for the conversation and supplied material, while the 128,000-token maximum output is the largest response the model could produce under the documented limit. These figures are not a guarantee that every task will use the full allowance; practical limits can also depend on the surrounding application and tool workflow.

Coding and reasoning strengths

GPT-5.2-Codex’s main distinction was its focus on sustained engineering work. A short prompt such as “write a parser” does not fully represent its intended role. More suitable examples include migrating a project across an API boundary, updating a large codebase while preserving existing behavior, tracing a problem through multiple components or making coordinated changes across a repository.

Its reasoning controls allowed an application to choose among low, medium, high and xhigh reasoning effort. Lower settings could be appropriate when a task needed a faster response or relatively straightforward code assistance. Higher settings were intended for problems where planning, verification and multi-step reasoning mattered more than immediate latency. The supplied editorial assessment rated its reasoning at 9 out of 10 and coding at 10 out of 10, but those numbers are subjective comparisons and not OpenAI benchmark claims.

Context compaction was also documented as a supported capability. In a long-running agent session, compaction can help preserve useful task state when the conversation or tool history becomes too large. This is particularly relevant to repository work, where the model may need to consider source files, command output, test results and previous decisions over many turns.

Inputs, outputs and tool use

GPT-5.2-Codex accepted text and image input but generated text output only. Image input could be useful when a developer needs to provide a screenshot of an error, interface, diagram or development environment. It was not an image, audio or video generation model. Audio and video input were not listed as supported modalities either.

The model supported tool use and function calling. In practical terms, this allowed a surrounding application or coding agent to expose operations such as reading files, running commands or invoking project-specific services. The model could decide when a declared tool was relevant, but the actual permissions and effects remained controlled by the application. Tool support therefore made GPT-5.2-Codex suitable for coding agents, but it did not by itself mean that the model could independently access a developer’s computer or repository.

Streaming was supported, allowing an application to display generated output progressively rather than waiting for the complete response. Structured outputs were also supported for responses that need to follow a defined schema. These features are useful when integrating the model into an agent or developer tool, although structured output does not change the model’s text-only output modality.

Historical API pricing and cost trade-offs

The supplied pricing information lists the standard price as $1.75 per 1 million input tokens and $14.00 per 1 million output tokens. Cached input was listed at $0.175 per 1 million tokens. These were API token prices, not a subscription price for an end-user coding application.

Output tokens were substantially more expensive than input tokens, so applications that ask for very long explanations, extensive patches or repeated generated artifacts could incur costs quickly. Caching could reduce the cost of repeated input context, which is potentially valuable in an agent that repeatedly refers to stable project instructions or source material. The model also supported a batch API, providing an option for workloads that do not require an immediate interactive response.

The editorial cost score was 7 out of 10 and the speed score was 6 out of 10. These are comparative editorial judgments, not provider-published measurements. They reflect the practical trade-off suggested by the model’s positioning: GPT-5.2-Codex was intended to spend more effort on difficult coding tasks, so a faster and cheaper model could be preferable for autocomplete, simple transformations or high-volume routine requests.

Best use cases

  • Large refactors: Coordinating changes across many files while keeping interfaces and dependencies consistent.
  • Code migrations: Planning and implementing changes that involve repeated edits, compatibility concerns and test or command feedback.
  • Repository-scale maintenance: Investigating an unfamiliar project, applying a broad change and reasoning over the resulting codebase.
  • Terminal and tool-driven workflows: Combining model reasoning with file, command or other functions exposed by a coding environment.
  • Windows development: Tasks specifically involving Windows software workflows, where the model was positioned as a useful option.
  • Defensive cybersecurity: Security analysis and defensive engineering tasks, provided that the surrounding workflow applies appropriate authorization and safeguards.

These use cases share a need for persistence, context and multi-step reasoning. They are a better fit than isolated, low-complexity prompts that do not benefit from a large context window or a coding-focused reasoning model.

Limitations and when another option is more appropriate

The most decisive limitation is lifecycle status. According to the supplied OpenAI deprecation information, GPT-5.2-Codex was retired and API access ended on July 23, 2026. It therefore should not be selected for a new production integration after that date. Existing documentation or historical evaluations may still refer to it, but availability must be checked before relying on any model identifier.

Its knowledge cutoff was August 31, 2025. A tool-enabled workflow could provide newer external information or repository context, but the underlying model knowledge cutoff itself was not updated by tools or retrieval. Projects that depend on recent libraries, current vulnerabilities or post-cutoff platform changes need explicit up-to-date inputs and verification.

GPT-5.2-Codex was also not designed for every type of AI task. It produced text only, so it was unsuitable for image, audio or video generation. It did not support fine-tuning, making it a poor fit when an organization specifically needs to train a customized model on its own examples. Its relatively deliberate speed and output pricing could make a smaller or faster coding model more suitable for simple code completion, routine formatting, basic explanations or very high-volume workloads.

For difficult repository changes, the model’s large context window, tool support and high reasoning settings were its strongest reasons for consideration. For short, latency-sensitive or cost-sensitive tasks, those advantages may not offset the additional expense and response time. Because the model was retired, a currently supported successor or alternative should be evaluated for any new implementation rather than attempting to build around GPT-5.2-Codex.

Overall assessment

GPT-5.2-Codex was a specialized model for treating software development as a sequence of connected engineering actions rather than a collection of independent code snippets. Its 400,000-token context window, 128,000-token maximum output, configurable reasoning effort, tool support and structured outputs aligned with long-running coding agents and repository-level work.

Those capabilities came with practical trade-offs: text-only output, no fine-tuning, a knowledge cutoff, relatively deliberate speed and higher output-token costs than a lightweight coding model might offer. Most importantly, the model’s documented retirement means its role is now historical. Its design nevertheless illustrates when a coding-optimized reasoning model is valuable: when a task is large, multi-step and dependent on maintaining context across a substantial software project.


Answers to Frequently Asked Questions

What were the limitations of GPT-5.2-Codex?
GPT-5.2-Codex generated text only, did not support fine-tuning, had a knowledge cutoff of August 31, 2025 and could be slower and more expensive than lightweight coding models for simple or high-volume tasks. Tool access also depended on the permissions and capabilities provided by the surrounding application.
Is GPT-5.2-Codex still available for new projects?
No. According to the supplied lifecycle information, GPT-5.2-Codex was deprecated on April 22, 2026, and API access ended on July 23, 2026. New projects should evaluate a currently supported successor or alternative model.
How much did GPT-5.2-Codex API access cost?
The historical API pricing was $1.75 per 1 million input tokens, $14.00 per 1 million output tokens and $0.175 per 1 million cached input tokens. These were API usage prices rather than subscription fees for an end-user coding application.
What was GPT-5.2-Codex designed for?
GPT-5.2-Codex was OpenAI’s coding-specialized model for agentic, long-horizon software engineering. It was designed for large refactors, code migrations, repository-scale maintenance, terminal-based workflows, Windows development and defensive cybersecurity.
What were the main specifications of GPT-5.2-Codex?
GPT-5.2-Codex had a 400,000-token context window, a maximum output of 128,000 tokens, low through xhigh reasoning settings, tool and function support, streaming, structured outputs and text-and-image input. It did not support fine-tuning.


Sources 4
Provider

About OpenAI