OpenAI GPT Codex delivers advanced coding capabilities with scalable reasoning depth. Supports multiple model variants (gpt-5-codex through gpt-5.4-codex) and multimodal inputs. Token-based pricing: $1.25/M input tokens, $9.00/M output tokens. Two endpoints: standard async (/gpt-codex) and live streaming (/gpt-codex/stream) via SSE.
About this model
GPT Codex is OpenAI's code-specialized model series built on GPT-5 architecture. Optimized for code generation, debugging, and complex engineering workflows with scalable reasoning depth. Supports five model variants from gpt-5-codex to gpt-5.4-codex, multimodal inputs, and SSE streaming. Token-based pricing: $1.25 per million input tokens and $9.00 per million output tokens.
Cost analysis
| Provider | Cost | Notes |
|---|---|---|
| muapiapp | $1.25/M input tokens, $9.00/M output tokens | Token-based billing. Minimum $0.00023 per call. All 5 Codex variants share the same pricing. Supports Prompt Caching (0.1x for hits, 1.25x for creation). |
| OpenAI (official) | ~$1.75/M input tokens, ~$14.00/M output tokens | Official pricing via api.openai.com. |
| Fal.ai | Not available | GPT Codex is not available on Fal.ai. |
Token-based billing. Minimum $0.00023 per call. All 5 Codex variants share the same pricing. Supports Prompt Caching (0.1x for hits, 1.25x for creation).
Official pricing via api.openai.com.
GPT Codex is not available on Fal.ai.
* Competitor pricing is estimated based on similar model architectures and usage tiers.
Configuration schema
| Parameter | Type | Description | Default |
|---|---|---|---|
| Prompt | string | The coding task or instruction. | Implement a binary search tree with insert, delete, and search methods in Python. |
| Model | Enum (5 options) | Codex model variant to use. | gpt-5.4-codex |
| Image URL | string | Optional image URL for multimodal requests. | undefined |
The coding task or instruction.
Implement a binary search tree with insert, delete, and search methods in Python.Codex model variant to use.
gpt-5.4-codexOptional image URL for multimodal requests.
undefinedDeveloper documentation
POST /api/v1/gpt-codex β returns request_id, poll for result via /api/v1/predictions/{id}/result.
POST /api/v1/gpt-codex/stream β returns a live SSE stream. Each chunk: data: {"choices":[{"delta":{"content":"text"}}]}, ending with data: [DONE].
Model variants (pass in the model field): gpt-5.4-codex (default, most capable), gpt-5.3-codex, gpt-5.2-codex, gpt-5.1-codex, gpt-5-codex.
See Streaming Documentation for full code examples.
Frequently asked
Pricing is token-based: $1.25 per million input tokens and $9.00 per million output tokens regardless of which Codex model variant you use. The minimum charge per call is $0.00023.
gpt-5.4-codex is the default and most capable variant. Use lower variants (gpt-5.3-codex, gpt-5.2-codex, etc.) if you need faster responses for simpler tasks. All variants share the same pricing.
/gpt-codex is async β you receive a request_id and poll for the result. /gpt-codex/stream returns a live SSE stream. Use streaming for interactive coding UIs; use the async endpoint for batch processing.
Yes. Prompt Caching allows you to reuse frequently used text prompts at reduced rates. Cache hits (reusing previously cached tokens) are charged at 0.1x of the input cost. New cache creation (writing new tokens to cache for future reuse) is charged at 1.25x of the standard input cost.