Best AI model for writing and reviewing code.
prices as of · re-ranked daily · 262 qualifying models
A change across a few files, or a review of someone else's. A lot of repository goes in, a patch comes out, and the model has to be able to run your tools. We count only models with 128k of context or more and tool calling, and 262 of the 337 we track qualify. The cheapest of them costs $0.189 per 1,000 tasks at Nous Portal. They are ranked by what the work costs, not by the price per million tokens, because a model that is cheap to prompt and dear to answer looks different once you know the shape of the job.
The cheapest model that can do this job is Mistral Nemo at Nous Portal: $0.189 per 1,000 tasks, read on 16 Sept 2026.
Cheapest that qualifies
Mistral Nemo
$0.189per 1,000 tasks
$0.02 / $0.03 per M tokens · $1.43 at list
lowest cost per 1,000 tasks
Cheapest from the maker
Command R7B Arabic
$0.525per 1,000 tasks
$0.04 / $0.15 per M tokens · $0.525 at list
bought from the lab that trained it
Most context
DeepSeek V4.1 Flash
$0.464per 1,000 tasks
$0.04 / $0.08 per M tokens · $2.10 at list
the longest single call on this list
What actually matters here
- 128k context or more
- The files you are changing, the ones they import and the tests around them add up fast. Below 128k you spend the session dropping things out of the context.
- Tool calling required
- Reading files, running tests and applying a patch are all tool calls. A model that cannot make them cannot do this job.
- Input dwarfs output
- More than five tokens go in for every one that comes out, so the input price, and whatever the provider charges for cached input, is what you actually pay.
Cheapest 10 for writing and reviewing code
- 1
Nous PortalMistral Nemo
$0.189 per 1,000 tasks · $0.02 / $0.03 per M tokens · 128k contextResells OpenRouter's catalog at 0.80× the listed price, funded by a subscription whose credits carry a 10% bonus.
✓ 128k context✓ tool calling✓ open weights
$0.08/M tokens
- 2
Merge GatewayGLM-5.3-Flash
$0.195 per 1,000 tasks · $0.01 / $0.05 per M tokens · 1M contextHosts the open weights on its own servers, so the price is its own, not a resale. Precision not disclosed.
✓ 1M context✓ tool calling✓ structured output
$0.10/M tokens
- 3
Kilo GatewayLlama 3.1 8B Instruct
$0.22 per 1,000 tasks · $0.02 / $0.04 per M tokens · 131k contextRoutes to a host serving the open weights; precision not disclosed.
✓ 131k context✓ tool calling✓ structured output
$0.10/M tokens
- 4
OpenRouterLing 3.0 Flash
$0.263 per 1,000 tasks · $0.02 / $0.06 per M tokens · 262k contextThe same price OpenRouter charges.
✓ 262k context✓ tool calling✓ structured output
$0.13/M tokens
- 5
Eden AIQwen3.7 Flash
$0.283 per 1,000 tasks · $0.02 / $0.08 per M tokens · 1M contextAlibaba's China-region price list, which is lower than the international one. A region, not a deal.
✓ 1M context✓ tool calling✓ structured output
$0.14/M tokens
- 6
Kilo Gatewaygpt-oss-20b
$0.31 per 1,000 tasks · $0.02 / $0.10 per M tokens · 131k contextRoutes to a host serving the open weights; precision not disclosed.
✓ 131k context✓ tool calling✓ structured output
$0.16/M tokens
- 7
NanoGPTMercury 2.5
$0.326 per 1,000 tasks · $0.04 / $0.004 per M tokens · 260k contextThe same price Inception charges.
✓ 260k context✓ tool calling✓ structured output
$0.12/M tokens
- 8
Azure Cognitive ServicesMinistral 3B (latest)
$0.38 per 1,000 tasks · $0.04 / $0.04 per M tokens · 128k contextThe same price Mistral AI charges.
✓ 128k context✓ tool calling✓ open weights
$0.16/M tokens
- 9
NanoGPTNemotron 3.5 Lightning
$0.415 per 1,000 tasks · $0.05 / $0.01 per M tokens · 262k contextRoutes to a host serving the open weights; precision not disclosed.
✓ 262k context✓ tool calling✓ structured output
$0.16/M tokens
- 10
TrustedRouterDeepSeek V4.1 Flash
$0.464 per 1,000 tasks · $0.04 / $0.08 per M tokens · 1M contextRoutes to a host serving the open weights; precision not disclosed.
✓ 1M context✓ tool calling✓ structured output
$0.21/M tokens
A coding task is about 8,000 tokens in and 1,500 out. A cost per 1,000 tasks is that multiplied out at the row's own input and output rate. The price beside it is the standard price, three parts input to one part output per million tokens, so the two numbers answer different questions: $0.08 per million tokens is what the model costs, and $0.189 per 1,000 tasks is what the work costs.
Frequently asked
- What is the cheapest model for writing and reviewing code?
- Mistral Nemo at Nous Portal, $0.189 per 1,000 tasks on $0.02 / $0.03 per million tokens in and out, read on 16 Sept 2026.
- How is the cost per unit worked out?
- A coding task is about 8,000 tokens in and 1,500 out. Multiply that by 1,000 and price it at each row's own input and output rate. Nothing else is counted: no cache discount, no batch rate, no free tier.
- Why do only 262 models qualify?
- The job needs 128k of context or more, tool calling. Models that fall short are still in the index, they just cannot do this job as described.
- How current are these prices?
- Prices are read daily from 212 providers' public catalogs and this ranking recomputes with them. Last refresh: 16 Sept 2026.