Skip to content
Dashboard

GPT 5.2 Codex

GPT 5.2 Codex is the GPT-5.2 generation coding agent model from OpenAI, combining GPT-5.2 advances in reasoning with purpose-built autonomous software engineering capabilities.

File InputImplicit CachingReasoningTool UseVision (Image)Web Search
index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'openai/gpt-5.2-codex',
prompt: 'Why is the sky blue?'
})

Playground

Try out GPT 5.2 Codex by OpenAI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

openai logo
openai logo

Ask GPT 5.2 Codex anything to try it out.

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Azure
400K
0.7s
54tps
$1.75/M$14.00/M
Read:$0.17/M
Write:
$14/K
+ input costs
+4
12/18/2025
OpenAI
400K
0.4s
6tps
$1.75/M$14.00/M
Read:$0.17/M
Write:
$10/K
+ input costs
+4
12/18/2025
Throughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Latency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Uptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

More models by OpenAI

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
Providers
ZDR
No Training
Release Date
1M
2.8s
40tps
$5.00/M
$30.00/M
Read:
$0.5/M
Write:
$10.00/K
+ input costs
+4
azure logo
bedrock logo
openai logo
04/24/2026
400K
0.8s
134tps
$0.75/M$4.50/M
Read:$0.07/M
Write:
$10.00/K
+ input costs
+4
azure logo
openai logo
03/17/2026
1.1M
1.1s
83tps
$2.50/M
$15.00/M
Read:
$0.25/M
Write:
$10.00/K
+ input costs
+4
azure logo
openai logo
03/05/2026
400K
4.0s
125tps
$0.25/M$2.00/M
Read:$0.03/M
Write:
$14/K
+ input costs
+4
azure logo
openai logo
08/07/2025
131K
0.2s
244tps
$0.35/M$0.75/M
Read:$0.25/M
Write:
baseten logo
bedrock logo
cerebras logo
+5
08/05/2025
128K
0.6s
61tps
$0.15/M$0.60/M
Read:$0.07/M
Write:
$14/K
+ input costs
+3
azure logo
openai logo
07/18/2024

About GPT 5.2 Codex

GPT 5.2 Codex became available on December 18, 2025 on AI Gateway as the GPT-5.2 generation coding agent. It combines GPT-5.2's advances in reasoning depth and instruction following with the specialized coding agent architecture that reads repositories, plans changes, writes code, executes tests, and iterates.

The model handles complex multi-file changes, architectural decisions, and codebase-wide refactoring with GPT-5.2 generation quality. The context window of 400K tokens enables comprehensive repository understanding.

For teams building AI-powered development tools, GPT 5.2 Codex provides GPT-5.2 generation capability in the codex agent architecture.

What To Consider When Choosing a Provider

  • Configuration: GPT 5.2 Codex incorporates GPT-5.2 generation improvements for better code comprehension and more reliable autonomous task completion over GPT-5.1 codex.
  • Configuration: Like other codex models, it operates in the read-plan-write-execute-verify loop rather than one-shot code generation.
  • Zero Data Retention: AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

When to Use GPT 5.2 Codex

Best For

  • Complex autonomous coding: Software engineering tasks that benefit from GPT-5.2 generation reasoning
  • Enterprise codebase management: Large-scale refactoring, migration, and modernization projects
  • Advanced code review: Deep architectural analysis with GPT-5.2 generation reasoning
  • Complex feature development: Multi-component features that span services and modules
  • Code quality enforcement: Comprehensive analysis and improvement of existing codebases

Consider Alternatives When

  • Routine coding: Codex mini variants for everyday bug fixes and feature scaffolding
  • Maximum compute: GPT-5.1 codex max for tasks that benefit from extended reasoning time
  • Non-coding tasks: Base GPT-5.2 handles general-purpose reasoning and generation outside the read-plan-write-execute-verify codex loop
  • Budget constraints: Earlier codex generations at lower price points

Conclusion

GPT 5.2 Codex combines GPT-5.2 generation improvements with purpose-built autonomous coding capabilities. For software engineering workflows on AI Gateway, it is the codex option within the GPT-5.2 family.