Primary navigation

Legacy APIs

gpt-5-codex
GPT-5-Codex
A version of GPT-5 optimized for agentic coding in Codex
Reasoning
Speed
Price
$1.25$10
Input
Output

GPT-5-Codex is a version of GPT-5 optimized for agentic coding tasks in Codex or similar environments. It's available in the Responses API only and the underlying model snapshot will be regularly updated. If you want to learn more about prompting GPT-5-Codex, refer to our dedicated guide.

400,000 context window
128,000 max output tokens
Sep 30, 2024 knowledge cutoff
Reasoning token support
Pricing
Pricing is based on the number of tokens used, or other metrics based on the model type. For tool-specific models, like search and computer use, there’s a fee per tool call. See details in the pricing page.
Text tokens
Per 1M tokens
Input
$1.25
Cached input
$0.125
Output
$10.00
Quick comparison
Input
Cached input
Output
codex-mini-latest
$1.50
GPT-5-Codex
$1.25
GPT-5
$1.25
Modalities
Text
Input and output
Image
Input only
Audio
Not supported
Video
Not supported
Endpoints
Chat Completions
v1/chat/completions
Responses
v1/responses
Realtime
v1/realtime
Assistants
v1/assistants
Batch
v1/batch
Fine-tuning
v1/fine-tuning
Embeddings
v1/embeddings
Image generation
v1/images/generations
Videos
v1/videos
Image edit
v1/images/edits
Speech generation
v1/audio/speech
Transcription
v1/audio/transcriptions
Translation
v1/audio/translations
Moderation
v1/moderations
Completions (legacy)
v1/completions
Features
Streaming
Supported
Function calling
Supported
Structured outputs
Supported
Fine-tuning
Not supported
Distillation
Not supported
Predicted outputs
Not supported
Snapshots
Snapshots let you lock in a specific version of the model so that performance and behavior remain consistent. Below is a list of all available snapshots and aliases for GPT-5-Codex.
gpt-5-codex
gpt-5-codex
gpt-5-codex
gpt-5-codex
Rate limits
Rate limits ensure fair and reliable access to the API by placing specific caps on requests or tokens used within a given time period. Your usage tier determines how high these limits are set and automatically increases as you send more requests and spend more on the API.
TierRPMTPMBatch queue limit
FreeNot supported
Tier 1500500,0001,500,000
Tier 25,0001,000,0003,000,000
Tier 35,0002,000,000100,000,000
Tier 410,0004,000,000200,000,000
Tier 515,00010,000,00015,000,000,000