Skip to content
LLMs

Cheapest LLMs for coding

Mistral: Mistral Nemo is the cheapest option at $0.029 per million input tokens. Coding workloads read a lot of context and call tools constantly, so tool support and a large context window matter as much as the headline price.

279 models qualify

Ranked by blended cost - input weighted 75%, output 25%.

Language models with price per million tokens and context window
#ModelBlended / 1MInput / 1MOutput / 1MContextCapabilities
1
TypeSafe logo
Jev Router

TypeSafe

$-1000000.0000$-1000000.0000$-1000000.00001M
ReasoningToolsVision
2$-1000000.0000$-1000000.0000$-1000000.00002M
ReasoningToolsVision
3$-1000000.0000$-1000000.0000$-1000000.00002M
ReasoningTools
4
OpenRouter logo
Auto Router

OpenRouter

$-1000000.0000$-1000000.0000$-1000000.00002M
ReasoningToolsVision
5
Recursive logo
Flint (free)

Recursive

FreeFreeFree262K
Free tierReasoningToolsOpen weights
6FreeFreeFree262K
Free tierReasoningToolsOpen weights
7FreeFreeFree512K
Free tierReasoningToolsVision
8FreeFreeFree256K
Free tierReasoningToolsOpen weights
9FreeFreeFree256K
Free tierReasoningToolsVisionOpen weights
10FreeFreeFree200K
Free tierReasoningToolsVision
11
Mistral AI logo
Mistral Nemo

Mistral AI

$0.029$0.029$0.030131K
ToolsOpen weights
12
inclusionAI logo
Ling 3.0 Flash

inclusionAI

$0.032$0.021$0.063262K
ReasoningToolsOpen weights
13$0.036$0.018$0.090131K
ReasoningToolsOpen weights
14$0.055$0.030$0.1301M
ReasoningToolsVision
15$0.057$0.050$0.080131K
ToolsOpen weights
16$0.061$0.035$0.140128K
Tools
17
Inception logo
Mercury 2.5

Inception

$0.068$0.040$0.150260K
ReasoningTools
18$0.075$0.060$0.120262K
Free tierReasoningToolsOpen weights
19$0.075$0.050$0.150131K
ToolsVisionOpen weights
20
IBM Granite logo
Granite 4.2 8B

IBM Granite

$0.082$0.060$0.150131K
ReasoningToolsOpen weights
21$0.087$0.050$0.200524K
ReasoningTools
22$0.090$0.060$0.180131K
ReasoningToolsVisionOpen weights
23$0.092$0.080$0.130262K
ReasoningToolsVisionOpen weights
24$0.100$0.100$0.100131K
ToolsVisionOpen weights
25$0.103$0.070$0.200262K
Free tierReasoningToolsOpen weights

Frequently asked

What is the cheapest LLM for code generation and refactoring?

Mistral: Mistral Nemo at $0.029 per million input tokens and $0.030 per million output tokens, with a 131K token context window.

How many models qualify for code generation and refactoring?

279 of the 358 models tracked here meet the criteria for this list.

How much do prices vary within this category?

By roughly 2,300×, from Mistral Nemo at the bottom to GPT-5.4 Pro at the top.