Cheapest models for coding
Ranked by input $/Mtoken, then output. Strong code generation and agent coding loops.
- 1MiniMax M3 (free)
Minimax · 1,048,576 context
Input
$0/M
Output
$0/M
- 2GLM 5.2 (free)
Z Ai · 32,768 context
Input
$0/M
Output
$0/M
- 3Qwen3.8 27B (free)
Qwen · 262,144 context
Input
$0/M
Output
$0/M
- 4Ling 3.0 Flash VL (free)
Inclusionai · 262,144 context
Input
$0/M
Output
$0/M
- 5Ling 3.0 Flash Fin (free)
Inclusionai · 262,144 context
Input
$0/M
Output
$0/M
- 6DeepSeek V4 Flash 0731
DeepSeek · 1,048,576 context
Input
$0.011/M
Output
$1.28/M
- 7Ling 3.0 Flash VL
Inclusionai · 262,144 context
Input
$0.021/M
Output
$0.062/M
- 8Ling 3.0 Flash Fin
Inclusionai · 262,144 context
Input
$0.060/M
Output
$0.180/M
- 9GLM 5.3 Flash (batch)
Z Ai · 1,048,576 context
Input
$0.060/M
Output
$0.200/M
- 10Mistral Small 3.2 24B
Mistral · 256,000 context
Input
$0.094/M
Output
$0.250/M
- 11Llama 4 Scout
Meta · 1,310,720 context
Input
$0.100/M
Output
$0.300/M
- 12GPT-5.6 Luna (batch)
OpenAI · 1,050,000 context
Input
$0.100/M
Output
$0.600/M
- 13GPT-5.4 Nano (batch)
OpenAI · 400,000 context
Input
$0.100/M
Output
$0.625/M
- 14DeepSeek V4 Flash 0731 (batch)
DeepSeek · 1,048,576 context
Input
$0.110/M
Output
$0.330/M
- 15MiMo-V2.5
Xiaomi · 1,050,000 context
Input
$0.140/M
Output
$0.280/M
- 16GLM 5.3 Flash
Z Ai · 1,048,576 context
Input
$0.150/M
Output
$0.500/M
- 17GPT-4o-mini
OpenAI · 128,000 context
Input
$0.150/M
Output
$0.600/M
- 18Hy3 preview
Tencent · 262,144 context
Input
$0.180/M
Output
$0.600/M
- 19Llama 4 Maverick
Meta · 1,048,576 context
Input
$0.188/M
Output
$0.652/M
- 20GPT-5.6 Luna
OpenAI · 1,050,000 context
Input
$0.200/M
Output
$1.20/M
- 21GPT-5.4 Nano
OpenAI · 400,000 context
Input
$0.200/M
Output
$1.25/M
- 22DeepSeek V4 Pro 0423
DeepSeek · 1,048,576 context
Input
$0.209/M
Output
$0.418/M
- 23GLM 5.3
Z Ai · 1,048,576 context
Input
$0.222/M
Output
$3.39/M
- 24Nex-N2-Pro
Nex Agi · 262,144 context
Input
$0.250/M
Output
$1.00/M
- 25DeepSeek V3
DeepSeek · 163,840 context
Input
$0.257/M
Output
$1.03/M
- 26DeepSeek V3.2
DeepSeek · 163,840 context
Input
$0.280/M
Output
$0.420/M
- 27Qwen3 Coder 480B A35B
Qwen · 262,144 context
Input
$0.300/M
Output
$1.00/M
- 28KAT-Coder-Pro V2
Kwaipilot · 262,144 context
Input
$0.300/M
Output
$1.20/M
- 29MiniMax M3
Minimax · 1,048,576 context
Input
$0.300/M
Output
$1.20/M
- 30MiniMax M3 (batch)
Minimax · 524,288 context
Input
$0.300/M
Output
$1.20/M
- 31Qwen3.7 Plus
Qwen · 1,000,000 context
Input
$0.320/M
Output
$1.28/M
- 32Gemini 3.8 Flash (batch)
Google · 1,048,576 context
Input
$0.375/M
Output
$1.88/M
- 33Gemini 3.7 Flash (batch)
Google · 1,048,576 context
Input
$0.375/M
Output
$1.88/M
- 34Gemini 3.6 Flash (batch)
Google · 1,048,576 context
Input
$0.375/M
Output
$1.88/M
- 35GPT-5.4 Mini (batch)
OpenAI · 400,000 context
Input
$0.375/M
Output
$2.25/M
- 36GLM 5.2
Z Ai · 1,048,576 context
Input
$0.410/M
Output
$3.99/M
- 37Qwen3.8 27B
Qwen · 1,000,000 context
Input
$0.420/M
Output
$3.00/M
- 38Kimi K2.6
Moonshotai · 262,144 context
Input
$0.434/M
Output
$1.83/M
- 39MiMo-V2.5-Pro
Xiaomi · 1,050,000 context
Input
$0.435/M
Output
$0.870/M
- 40GLM 5.3 (batch)
Z Ai · 1,048,576 context
Input
$0.450/M
Output
$2.00/M