Best AI model for writing and reviewing code.

Prices checked

gpt-oss-20b at TrustedRouter costs you $0.15 per 1,000 tasks, the cheapest of 312 models that can do this job, checked .

Cheapest 10

all 392 models
  1. 1

    TrustedRouter · $0.01 in · $0.05 out

    $0.15per 1,000 tasks
  2. 2

    Llama 3.1 8B Instruct

    Runs it themselves

    Helicone · $0.02 in · $0.03 out

    $0.20per 1,000 tasks
  3. 3

    Mistral Nemo

    Lower precision (fp8)

    Eden AI · $0.02 in · $0.03 out

    $0.23per 1,000 tasks
    View
  4. 4

    Ling 3.0 Flash

    Same as maker

    OpenRouter · $0.02 in · $0.06 out

    $0.26per 1,000 tasks
    View
  5. 5

    Qwen3.7 Flash

    Regional price

    Eden AI · $0.02 in · $0.08 out

    $0.28per 1,000 tasks
    View
  6. 6

    Granite 4.0 H Micro

    Same as maker

    Cloudflare Workers AI · $0.02 in · $0.11 out

    $0.30per 1,000 tasks
    View
  7. 7

    Ministral 3 3B

    Runs it themselves

    Azure Cognitive Services · $0.04 in · $0.04 out

    $0.38per 1,000 tasks
  8. 8

    NanoGPT · $0.05 in · $0.01 out

    $0.41per 1,000 tasks
    View
  9. 9

    Qwen3.5-9B

    Regional price

    Eden AI · $0.04 in · $0.07 out

    $0.42per 1,000 tasks
    View
  10. 10

    DeepSeek V4.1 Flash 1017

    Runs it themselves

    Engy · $0.03 in · $0.12 out

    $0.42per 1,000 tasks

Other ways to pick

What matters

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.
How we count

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 312 of the 392 we track qualify. The cheapest of them costs $0.15 per 1,000 tasks at TrustedRouter. 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.

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, so it says what the work costs; the price per million tokens under each name says what the model costs.

A price below the maker's is listed only when the provider says why.

Resells
The provider sells another company's endpoint, at a margin of its own or at the maker's price.
Runs it themselves
The provider runs the open weights on hardware of its own, so the price is its own rather than a resale.
Lower precision
The open weights, served at a lower precision than the maker's, so not quite the same product.
Same as maker
Sold by someone else at the price the maker charges.
Regional price
A price list for one region, lower than the international one. A region, not a deal.

Frequently asked

What is the cheapest model for writing and reviewing code?
gpt-oss-20b at TrustedRouter, $0.15 per 1,000 tasks at $0.01 in and $0.05 out per million tokens, read on 31 Oct 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 312 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 every 3 days from 237 providers' public catalogs and this ranking recomputes with them. Last refresh: 31 Oct 2026.

Related jobs