What GPT Codex models cost per coding task
GPT-5.1 Codex, GPT-5.1 Codex Mini and GPT-5.3 Codex priced per modelled coding task, with cached input.
List prices per million tokens
| Model | Input | Output | Cache write | Cache read |
|---|---|---|---|---|
| GPT-5.1 Codex Mini | $0.25 | $2 | $0.25 | $0.025 |
| GPT-5.1 Codex | $1.25 | $10 | $1.25 | $0.125 |
| GPT-5.3 Codex | $1.75 | $14 | $1.75 | $0.175 |
First-party API list prices as of 2026-11-09. Cache write is the 5-minute write; OpenAI models have no write premium.
GPT-5.1 Codex Mini per task
Worked example · modelled, not measured| Task | Calls | Tidy | Messy |
|---|---|---|---|
| pull request | 38 | $0.12 | $0.15 |
| bug fix | 26 | $0.07 | $0.09 |
| refactor | 55 | $0.25 | $0.29 |
| test suite | 44 | $0.20 | $0.24 |
| migration | 80 | $0.42 | $0.48 |
| ticket | 32 | $0.09 | $0.12 |
GPT-5.1 Codex per task
Worked example · modelled, not measured| Task | Calls | Tidy | Messy |
|---|---|---|---|
| pull request | 38 | $0.61 | $0.76 |
| bug fix | 26 | $0.34 | $0.44 |
| refactor | 55 | $1.24 | $1.45 |
| test suite | 44 | $0.99 | $1.18 |
| migration | 80 | $2.11 | $2.40 |
| ticket | 32 | $0.47 | $0.59 |
GPT-5.3 Codex per task
Worked example · modelled, not measured| Task | Calls | Tidy | Messy |
|---|---|---|---|
| pull request | 38 | $0.86 | $1.06 |
| bug fix | 26 | $0.47 | $0.62 |
| refactor | 55 | $1.73 | $2.04 |
| test suite | 44 | $1.39 | $1.66 |
| migration | 80 | $2.95 | $3.35 |
| ticket | 32 | $0.65 | $0.82 |
Which one should you use?
Per token, the top tier costs more, but a stronger model can finish in fewer calls and with fewer retry loops, and the number of calls drives the bill. Compare cost per finished task, not per token: itemize a few of your own sessions on each model and look at the receipts side by side.
Itemize your own session
Drop a Claude Code or Codex log. It is parsed in your browser, and you get your real numbers instead of a model.
Drop a session log here
Claude Code ~/.claude/projects/…/*.jsonl, a Codex rollout ~/.codex/sessions/…/rollout-*.jsonl, or the claude-code-action execution file.
Parsed in your browser. Your prompts and code never leave this tab.