AiCostCompare

GPT-5 Codex

by OpenAI · openai/gpt-5-codex · #246 cheapest of 325 paid models

Prices updated Jul 22, 2026, 2:43 AM UTC · refreshed hourly

GPT-5-Codex is a specialized version of GPT-5 optimized for software engineering and coding workflows. It is designed for both interactive development sessions and long, independent execution of complex engineering tasks....

Compare vs:Claude Sonnet 5Claude Opus 4.6Claude Haiku 4.5Gemini 3.6 Flash

Pricing

Input

$1.25

per 1M tokens

Output

$10.00

per 1M tokens

Blended (3:1)

$3.44

3 input : 1 output

Cache read

$0.125

per 1M cached tokens

Cache write

per 1M tokens

Cache & batch economics

Effective prices for GPT-5 Codex with prompt caching.

Cache hit rateEffective blended $/1MExample request*vs no cache
0%$3.44$0.1375
50%$3.02$0.0813−41%
90%$2.68$0.0362−74%

*Example: 100K sticky context + 2K new input + 1K output. Batch discount is an approximate 50% off list rates for this provider’s batch API. Confirm on the vendor’s pricing page.

What a request costs

WorkloadInput tokensOutput tokensCost / requestCost / 1K requests
Short chat message500300$0.003625$3.62
Document summary8,0001,000$0.02$20.00
Codebase question (RAG)30,0002,000$0.0575$57.50
Long-context analysis150,0005,000$0.2375$237.50

Performance

Intelligence Index

36.1

AA composite quality

Coding Index

Math Index

98.7

Agentic Index

Output speed

173 tok/s

median

Time to first token

8.91s

median

Time to first answer

8.91s

after reasoning tokens

Artificial Analysis benchmarks

BenchmarkScore
MMLU-Pro86.5%
GPQA Diamond83.7%
Humanity's Last Exam25.6%
LiveCodeBench84.0%
SciCode40.9%
AIME 202598.7%
IFBench74.1%
AA-LCR (Long Context Reasoning)69.0%
Terminal-Bench Hard37.9%
τ²-Bench (Telecom)86.8%

Design Arena Elo

CategoryElo
Web apps1,138
Mobile apps1,132

Specs

Context window

400K

tokens

Max output

128K

tokens

Input modalities

text, image

Tokenizer

GPT