Cheapest models for coding
Ranked by input $/Mtoken, then output. Strong code generation and agent coding loops.
- 1Mistral Small 3.2 24B
Mistral · 128,000 context
Input
$0.075/M
Output
$0.200/M
- 2DeepSeek V4 Flash
DeepSeek · 1,048,576 context
Input
$0.090/M
Output
$0.180/M
- 3Llama 4 Scout
Meta · 10,000,000 context
Input
$0.100/M
Output
$0.300/M
- 4Llama 4 Maverick
Meta · 1,048,576 context
Input
$0.150/M
Output
$0.600/M
- 5GPT-4o-mini
OpenAI · 128,000 context
Input
$0.150/M
Output
$0.600/M
- 6GPT-5.4 Nano
OpenAI · 400,000 context
Input
$0.200/M
Output
$1.25/M
- 7DeepSeek V3
DeepSeek · 131,072 context
Input
$0.200/M
Output
$0.800/M
- 8Qwen3 Coder 480B A35B
Qwen · 1,048,576 context
Input
$0.220/M
Output
$1.80/M
- 9DeepSeek V3.2
DeepSeek · 131,072 context
Input
$0.229/M
Output
$0.343/M
- 10MiniMax M3
Minimax · 1,048,576 context
Input
$0.300/M
Output
$1.20/M
- 11Qwen3.7 Plus
Qwen · 1,000,000 context
Input
$0.320/M
Output
$1.28/M
- 12DeepSeek V4 Pro
DeepSeek · 1,048,576 context
Input
$0.435/M
Output
$0.870/M
- 13MiMo-V2.5-Pro
Xiaomi · 1,048,576 context
Input
$0.435/M
Output
$0.870/M
- 14GLM 5.2
Z Ai · 1,048,576 context
Input
$0.540/M
Output
$1.76/M
- 15Kimi K2.6
Moonshotai · 262,144 context
Input
$0.660/M
Output
$3.41/M
- 16R1
DeepSeek · 163,840 context
Input
$0.700/M
Output
$2.50/M
- 17Kimi K2.7 Code
Moonshotai · 262,144 context
Input
$0.720/M
Output
$3.49/M
- 18GPT-5.4 Mini
OpenAI · 400,000 context
Input
$0.750/M
Output
$4.50/M
- 19Qwen3 Max
Qwen · 262,144 context
Input
$0.780/M
Output
$3.90/M
- 20GLM 5.1
Z Ai · 202,752 context
Input
$0.966/M
Output
$3.04/M
- 21Claude Haiku 4.5
Anthropic · 200,000 context
Input
$1.00/M
Output
$5.00/M
- 22GPT-5.6 Luna
OpenAI · 1,050,000 context
Input
$1.00/M
Output
$6.00/M
- 23Qwen3.7 Max
Qwen · 1,000,000 context
Input
$1.25/M
Output
$3.75/M
- 24Gemini 2.5 Pro
Google · 1,048,576 context
Input
$1.25/M
Output
$10.00/M
- 25Gemini 3.5 Flash
Google · 1,048,576 context
Input
$1.50/M
Output
$9.00/M
- 26Grok 4.5
xAI · 500,000 context
Input
$2.00/M
Output
$6.00/M
- 27Mistral Large
Mistral · 128,000 context
Input
$2.00/M
Output
$6.00/M
- 28o3
OpenAI · 200,000 context
Input
$2.00/M
Output
$8.00/M
- 29Claude Sonnet 5
Anthropic · 1,000,000 context
Input
$2.00/M
Output
$10.00/M
- 30Gemini 3.1 Pro Preview
Google · 1,048,576 context
Input
$2.00/M
Output
$12.00/M
- 31GPT-4o
OpenAI · 128,000 context
Input
$2.50/M
Output
$10.00/M
- 32GPT-5.6 Terra
OpenAI · 1,050,000 context
Input
$2.50/M
Output
$15.00/M
- 33GPT-5.4
OpenAI · 1,050,000 context
Input
$2.50/M
Output
$15.00/M
- 34Claude Sonnet 4.5
Anthropic · 1,000,000 context
Input
$3.00/M
Output
$15.00/M
- 35Claude Sonnet 4
Anthropic · 1,000,000 context
Input
$3.00/M
Output
$15.00/M
- 36Claude Sonnet 4.6
Anthropic · 1,000,000 context
Input
$3.00/M
Output
$15.00/M
- 37Claude Opus 4.6
Anthropic · 1,000,000 context
Input
$5.00/M
Output
$25.00/M
- 38Claude Opus 4.8
Anthropic · 1,000,000 context
Input
$5.00/M
Output
$25.00/M
- 39Claude Opus 4.7
Anthropic · 1,000,000 context
Input
$5.00/M
Output
$25.00/M
- 40GPT-5.6 Sol
OpenAI · 1,050,000 context
Input
$5.00/M
Output
$30.00/M