Coding models run from $0.07 to $5.00 per million input tokens — a seventy-fold spread. Almost nobody needs the top of that range for every request, and almost nobody can get away with the bottom of it for every request either.
Here is a shortlist by job, with prices and context lengths read live from the provider API today.
Prices last checked: August 26, 2026. Live figures are on the compare page.
The cheap end: autocomplete and bulk work
Inline completions, boilerplate, docstrings, test stubs — high volume, short outputs, low stakes per call.
| Model | Input $/1M | Output $/1M | Context |
|---|---|---|---|
| Qwen3 Coder 30B A3B | $0.07 | $0.28 | 262,144 |
| Qwen3 Coder Next | $0.12 | $0.80 | 262,144 |
| KAT Coder Air v2.5 | $0.15 | $0.60 | 256,000 |
| Qwen3 Coder Flash | $0.20 | $0.97 | 1,000,000 |
Qwen3 Coder 30B is the floor, and its output rate is what makes it usable at volume: $0.28 per million output tokens against $25.00 for Claude Opus 5. Completions are mostly output, so that ratio is the one that matters.
Qwen3 Coder Flash is worth a look for a different reason — a million-token context at $0.20 input. That is an unusual combination: whole-repository context at the price of an autocomplete model.
The middle: everyday assistance
Explaining code, writing a function against a spec, fixing a failing test.
| Model | Input $/1M | Output $/1M | Context |
|---|---|---|---|
| Qwen3 Coder | $0.30 | $1.00 | 262,144 |
| KAT Coder Pro v2 | $0.30 | $1.20 | 262,144 |
| GPT-5.1 Codex Mini | $0.25 | $2.00 | 400,000 |
| Qwen3 Coder Plus | $0.65 | $3.25 | 1,000,000 |
| Kimi K2.7 Code | $0.67 | $3.40 | 262,144 |
| DeepSeek V4 Pro | $0.87 | $1.74 | 1,048,576 |
| Claude Haiku 4.5 | $1.00 | $5.00 | 200,000 |
DeepSeek V4 Pro is the outlier here. Its output rate is only twice its input rate — $0.87 in, $1.74 out. Every other model in this article charges four to ten times more for output than input. For work that generates a lot of code, that ratio compounds fast.
Compare: at 10M input and 5M output tokens a month, DeepSeek V4 Pro costs $17.40; Claude Haiku 4.5 costs $35.00; GPT-5.1 Codex costs $62.50.
The top: agentic work and hard refactors
Multi-file changes, long tool-using sessions, anything where a wrong answer costs more than the tokens.
| Model | Input $/1M | Output $/1M | Context |
|---|---|---|---|
| GPT-5.1 Codex | $1.25 | $10.00 | 400,000 |
| GPT-5.1 Codex Max | $1.25 | $10.00 | 400,000 |
| GPT-5.2 Codex | $1.75 | $14.00 | 400,000 |
| GPT-5.3 Codex | $1.75 | $14.00 | 400,000 |
| Claude Sonnet 5 | $2.00 | $10.00 | 1,000,000 |
| Claude Opus 5 | $5.00 | $25.00 | 1,000,000 |
The context column is the reason to read this table twice. The entire GPT-5 Codex family is capped at 400,000 tokens; Claude Sonnet 5 and Opus 5 carry 1,000,000. For agentic sessions that accumulate file contents, tool definitions and a long history, that is a structural difference, not a preference.
And note Claude Sonnet 5's $2.00 input is currently an introductory rate. The standard rate is $3.00 / $15.00, which would move a 10M-in / 5M-out month from $70 to $105.
The lever nobody uses: batch
OpenRouter lists GPT-5 Codex batch at $0.62 / $5.00 against the standard Codex family's $1.25 / $10.00 — half price, for work that does not need an answer this second.
Test generation, documentation passes, bulk migration, nightly review runs. If a job can wait, it can cost half. This is the single largest saving available on this page and it requires no model change.
The two things that move a coding bill most
Output length. Every model here charges more for output than input — between 2× and 8× more. A model told to return only the changed lines costs far less than one returning the whole file, and the instruction is one sentence.
Re-sent context. Coding agents accumulate: file contents, tool definitions (roughly 390 tokens each), and the full session history on every turn. A twenty-tool agent spends about 8,000 tokens before the user types. Prompt caching is the fix for the fixed part of that.
Between them, these two decide more of the bill than the model choice does.
What this list cannot tell you
Which model writes the better code.
Everything above is price, context length and the specialisation the maker claims. None of that is a measure of code quality, and we have not benchmarked these models — printing benchmark numbers we have not verified is exactly what this blog exists not to do.
The test that works is cheap: take five real tickets from your own backlog, run them through three candidates from the right band, and read the diffs. At Qwen3 Coder's $0.30 per million input tokens, that experiment costs cents.
The short version
| If you are… | Start with | Input $/1M |
|---|---|---|
| running autocomplete at volume | Qwen3 Coder 30B A3B | $0.07 |
| needing repo-scale context cheaply | Qwen3 Coder Flash (1M ctx) | $0.20 |
| doing everyday assistance | Qwen3 Coder or DeepSeek V4 Pro | $0.30 / $0.87 |
| running long agentic sessions | Claude Sonnet 5 (1M ctx) | $2.00 |
| doing work that must not be wrong | Claude Opus 5 | $5.00 |
| running jobs that can wait | GPT-5 Codex batch | $0.62 |
And whichever you pick: cap the output length, cache the fixed prefix, and check whether the job can go through batch.
Explore more on ElliSekiz
Compare token prices and context lengths. The chat models page lists every text model with input and output rates; the compare page shows each against every provider that serves it.
Test on your own backlog. Every model page has a playground — five real tickets through three models settles more than any table.
Sources
- OpenRouter models API,
https://openrouter.ai/api/v1/models(prices, context lengths — read 2026-08-26) - Anthropic pricing (Claude Sonnet 5 introductory rate and standard rate)
- Anthropic — Token counting (tool-definition token cost)
