GPT 5 Codex

OpenAI responses

GPT 5 Codex is an OpenAI responses-API model.It supports a 272,000-token context windowwith up to 128,000 output tokens.Input is priced at $1.25/M tokens and output at $10.00/M tokens. Capabilities include function calling, vision, reasoning, prompt caching. Route GPT 5 Codex via Future AGI's Agent Command Center for unified observability, caching, and 15 routing strategies including cost-optimized fallback.

Pricing source: litellm Last verified: May 12, 2026 View source ↗
Cost calculator

Estimate GPT 5 Codex spend

Pick a workload, fine-tune the sliders, and see the monthly bill.

~3K in / ~400 out · 5K req/day
3,000
0272,000
400
0128,000
5,000
01,000,000
cached @ $0.1250/M
Per request
$0.007750
in $0.003750 · out $0.004000
Per day
$38.75
5,000 requests
Per month
$1,179
152,188 requests

Estimate uses $1.25/M input · $10.00/M output. Provider pricing changes. Production costs vary with retries, streaming overhead, and tool-call rounds.
Want this for free? Cache + route via Agent Command Center — first 100K requests and 100K cache hits free every month.

Pricing

Per-token rates, expressed in USD per 1M tokens. Verified May 12, 2026.

Input $1.25/M
Output $10.00/M
Cached input $0.125/M

Limits

Context window
272,000 tokens
Max input
272,000 tokens
Max output
128,000 tokens
Modalities
vision, pdf, text

Capabilities

  • Function calling ✓ supported
  • Parallel tool calls ✓ supported
  • Vision input ✓ supported
  • Audio input — not advertised
  • Audio output — not advertised
  • PDF input ✓ supported
  • Streaming ✓ supported
  • Structured output ✓ supported
  • Prompt caching ✓ supported
  • Reasoning ✓ supported

Where it's strong

  • +long-form generation — 128,000-token max output, top-4% of peers

Watch out for

  • No major caveats flagged from public spec.

Benchmarks pending

We haven't logged public benchmark scores for GPT 5 Codex yet. Have one to contribute? Submit a source — citations help us prioritise.

Try it

Call GPT 5 Codex via Agent Command Center

One OpenAI-compatible endpoint. Routing, fallback, semantic caching, guardrails, and cost tracking come along for the ride. First 100K requests + 100K cache hits free every month.

SDK
Native Future AGI client (agentcc / @agentcc/client). Per-call metadata — provider, cost, latency, cache hit, request id — is returned on x-agentcc-* response headers, so any HTTP client can read it.
# GPT 5 Codex via the Agent Command Center Python SDK
# pip install agentcc
import os
from agentcc import AgentCC

client = AgentCC(
    api_key=os.environ["AGENTCC_API_KEY"],   # from app.futureagi.com → Settings → API Keys
    base_url="https://gateway.futureagi.com/v1",
)

resp = client.chat.completions.create(
    model="openai/gpt-5-codex",
    messages=[{"role": "user", "content": "Hello, GPT 5 Codex!"}],
)

print(resp.choices[0].message.content)
print(f"Tokens: {resp.usage.total_tokens}")

# Per-call gateway metadata is returned on x-agentcc-* response headers.
# When you need it programmatically, use .with_raw_response to get them:
raw = client.chat.completions.with_raw_response.create(
    model="openai/gpt-5-codex",
    messages=[{"role": "user", "content": "Same call, but I want the headers."}],
)
print("Provider:", raw.headers.get("x-agentcc-provider"))
print("Latency:", raw.headers.get("x-agentcc-latency-ms"), "ms")
print("Cost:   ", raw.headers.get("x-agentcc-cost"), "USD")
print("Cache:  ", raw.headers.get("x-agentcc-cache"))
Set AGENTCC_API_KEY with a key fromapp.futureagi.com.Gateway docs ↗

Same model on other providers

gpt-5-codex is also available via 1 other route. Pricing, regions, and capabilities can differ — compare before routing production traffic.

ProviderInput / 1MOutput / 1MVerified
Azure OpenAI$1.25/M$10.00/MMay 12, 2026

Compare with similar models

GPT 5 Codex doesn't have a public Arena ELO score yet, so we group by provider only — quality-tier comparisons need a benchmark.

FAQ

How much does GPT 5 Codex cost?

Input is priced at $1.25 per 1M tokens and output at $10.00 per 1M tokens (OpenAI, last verified May 12, 2026).

What is the context window of GPT 5 Codex?

GPT 5 Codex supports a 272,000-token context window with up to 128,000 output tokens.

Does GPT 5 Codex support function calling?

Yes — GPT 5 Codex supports function (tool) calling, including parallel tool calls.

Is GPT 5 Codex good for production?

GPT 5 Codex is well-suited for long-form generation — 128,000-token max output, top-4% of peers.

How can I route to GPT 5 Codex with fallback?

Use Agent Command Center: a single OpenAI-compatible endpoint that supports cost-optimized routing, latency-aware retries, model fallback, and shadow traffic. Configure once, swap models without app changes.

Useful links for GPT 5 Codex

Official sources, independent benchmarks, and pricing aggregators — no random search-engine guesses.