gpt-5.2-codex

gpt-5.2-codex

An upgraded version of GPT-5.2, optimized for agent coding tasks in Codex or similar environments.
2026-01-21
LLM
Model capability: imageModel capability: function_call
Input:
$1.75/1M tokens
Output:
$14/1M tokens
Bulk order? Contact your manager for exclusive deals

API Overview

GPT‑5.2-Codex is OpenAI’s flagship agent coding model, primarily positioned as a highly reliable AI coding partner that empowers complex software engineering and defensive cybersecurity tasks. It is suitable for use in a variety of scenarios, including traditional software development (multi-language generation, refactoring, PR review), data analysis, machine learning model building, cybersecurity defense, and programming language education.

  • Enhanced Agent Coding: Deeply optimized based on GPT-5.2, it supports context compression and significantly improves performance in long-term code tasks such as refactoring and migration.
  • Enhanced Windows Environment Support: Natively adapted and optimized to address path recognition and command compatibility issues, ensuring more stable and efficient operation.
  • New Benchmark in Cybersecurity: Equipped with defensive capabilities such as vulnerability detection and fuzz testing.
  • Improved Multimodal Understanding: Accurately interprets screenshots, technical diagrams, and UI interfaces, enhancing human-machine collaboration efficiency.
  • Leading Measured Performance: Achieves a 56.4% task completion rate on SWE-Bench Pro (exceeding GPT-5.2) and a 64.0% accuracy rate on Terminal-Bench 2.0 (also surpassing GPT-5.2).

───────────────────────────────────────────────────────────────────

Core Capabilities

🧩 Strong Support for Long-Term Tasks: Powered by native context compression technology, it maintains full contextual understanding when handling long-term tasks such as project refactoring lasting several weeks, without losing track of collaborative progress. At the same time, it improves token utilization efficiency and reduces development costs.

🔧 Stable Delivery of Large-Scale Code: For complex tasks like code refactoring and language migration (e.g., Java to Kotlin), it can automatically iterate and optimize solutions without requiring manual guidance from scratch, easily meeting the demands of large-scale code repository development.

🪟 Optimized Windows Environment Compatibility: Natively supports Windows terminal operations, resolving common issues encountered in previous versions regarding path recognition and command compatibility under Windows systems, making it adaptable to a wider range of development environments.

👁️ Accurate Visual Understanding: Directly recognizes and parses screenshots, technical architecture diagrams, and UI design drafts—for example, uploading an app interface sketch can quickly generate runnable frontend prototype code, eliminating the intermediate step of describing designs in text and enhancing the coherence of the development process.

🛡️ High-Level Cybersecurity Protection: Possesses the strongest defensive cybersecurity capabilities to date, paired with a trusted access mechanism that not only enhances defense effectiveness but also strictly controls the risk of misuse.

🌐 Broad Compatibility Across Multiple Scenarios: Proficient in over 10 programming languages including Python, JavaScript, Go, and Perl, it adapts to various scenarios such as traditional development, data analysis, and AI model building. It can preload code libraries and precisely understand project specifications, supporting context-aware code completion and structured code generation.


───────────────────────────────────────────────────────────────────

Performance Showcase


Playground

Log in to explore more features! Click to Log In

API Analytics

API Reference (5)

API DescriptionAPI EndpointRequest MethodStabilityParameter Description
Chat(Talk)
POST
Stable
View Details
Chat (Image Analysis)
POST
Stable
View Details
Chat (Structured Output)
POST
Stable
View Details
Chat (function call)
POST
Stable
View Details
Responses
POST
Stable
View Details

API Pricing

$
ModelDescriptionContextOfficial Price302.AI Price

gpt-5.2-codex

-
400000

Input$1.75 / 1M tokens
Output$14 / 1M tokens

Input$1.75/ 1M tokens
Output$14/ 1M tokens
Original Price