Best AI model for code generation

In code generation, work within 60 Elo of the best model is available for 4× less: Muse Spark 1.3 at $1.98 per thousand tasks against $8.86 for Claude Opus 5.5.

112 models rated head to head in this category, not scored by a general benchmark and assumed to transfer. General programming tasks across languages, judged on whether the result works and reads well rather than on a benchmark score.

Highest ratedClaude Opus 5.51398 Elo · $8.86 / 1k tasks
Best valueMuse Spark 1.31358 Elo · $1.98 / 1k tasks

Nothing cheaper is as good

10 models are undominated here: for each, no cheaper model scores within 18 Elo. Everything else in the table below is beaten on both counts at once.

  1. 1Ministral 3 3B 25121014 Elo$0.085 / 1k131K context
  2. 2Ministral 3 8B 25121057 Elo$0.128 / 1k262K context
  3. 3GPT-5 Nano1088 Elo$0.148 / 1k400K context
  4. 4Solar Pro 41186 Elo$0.164 / 1k524K context
  5. 5DeepSeek V4 Flash 04231209 Elo$0.170 / 1k1.05M contextfp4 on some hosts
  6. 6MiMo-V2.51264 Elo$0.183 / 1k1.05M context
  7. 7Claude Haiku 5.51283 Elo$0.215 / 1k1.00M context
  8. 8MiMo-V2.6-Pro1321 Elo$0.472 / 1k1.05M context
  9. 9Muse Spark 1.31358 Elo$1.98 / 1k1.05M context
  10. 10Claude Opus 5.51398 Elo$8.86 / 1k1.00M context

Every model rated on code generation

Elo measured in this category specifically. A model strong overall can sit well down this table, which is the whole reason for ranking by task.

#ModelElo$/1kContextHosts
1Claude Opus 5.51398$8.861.00M11
2Claude Sonnet 5.51368$4.031.00M8
3Kimi K31367$6.241.05M25
4Muse Spark 1.31358$1.981.05M1
5GPT-6.1 Sol1347$4.431.05M8
6Claude Fable 5.11340$19.981.00M4
7Claude Opus 51328$11.251.00M11
8MiMo-V2.6-Pro1321$0.4721.05M4
9Muse Spark 1.21318$1.981.05M1
10Claude Fable 51314$20.521.00M6
11Gemini 3.7 Flash1313$1.541.05M6
12GLM 5.31311$1.931.05M41
13Gemini 3.8 Flash1309$1.541.05M6
14Grok 4.61296$3.40500K6
15Gemini 3.6 Flash1293$1.541.05M7
16GLM 5.21293$2.001.05M34
17Claude Opus 4.61293$10.261.00M6
18GLM 5.3 Flash1287$0.2301.05M32
19Claude Haiku 5.51283$0.2151.00M10
20Muse Spark 1.11281$1.981.05M1
21Claude Sonnet 51281$4.301.00M10
22Grok 4.51280$4.36500K4
23Claude Sonnet 4.61280$6.161.00M9
24Qwen3.7 Max1279$2.611.00M2
25Kimi K2.61276$1.52262K17
26Qwen3.7 Plus1272$0.5841.00M2
27GLM 5.11272$2.11203K13
28Grok 4.71271$3.40500K5
29MiMo-V2.5-Pro1270$0.4971.05M6
30Gemini 3.5 Flash1269$3.531.05M7
31GLM 5 Turbo1267$1.95203K1
32GPT-5.51264$12.901.05M7
33MiMo-V2.51264$0.1831.05M5
34Mistral Large 41261$1.001.05M3
35Claude Opus 4.81258$11.251.00M11
36Kimi K2.7 Code1257$1.75262K12
37MiniMax M31252$0.5471.05M13
38GLM 51249$1.42203K8
39Gemini 3.1 Pro Preview1248$4.701.05M6
40Claude Opus 4.51245$10.26200K6
41DeepSeek V4 Pro 04231244$1.681.05M15
42Qwen3.6 Plus1240$0.9751.00M1
43Kimi K2.51240$1.22262K5
44MiniMax M2.71237$0.534197K6
45DeepSeek V4 Flash 07311233$0.2331.05M27
46GLM 5V Turbo1232$1.95203K1
47Grok 4.201225$2.172.00M4
48GLM 4.71221$0.980203K6
49GPT-5.41215$6.451.05M7
50MiniMax M2.51211$0.523197K9
51Inkling1209$1.81524K2
52DeepSeek V4 Flash 04231209$0.1701.05M16
53MiniMax M2.11194$0.706205K2
54Gemini 3 Flash Preview1193$1.181.05M6
55Grok 4.31191$2.171.00M4
56Claude Sonnet 4.51187$6.161.00M7
57Solar Pro 41186$0.164524K2
58Step 3.7 Flash1186$0.470262K2
59Qwen3.5 397B A17B1184$1.49262K10
60GLM 4.7 Flash1181$0.193128K3
61Hy31180$0.265262K5
62DeepSeek V3.1 Terminus1179$0.672164K2
63GPT-5.11175$3.69400K5
64DeepSeek V3.2 Exp1175$0.447164K1
65Claude Opus 4.11175$30.78200K1
66GPT-5.21173$5.17400K4
67GPT-51172$3.69400K3
68Qwen3.5 Plus 2026-02-151171$0.7801.00M1
69GLM 4.61169$0.954203K4
70GLM 4.51169$1.03131K1
71DeepSeek V3.21168$0.504164K12
72GPT-5.1-Codex1156$3.69400K1
73Gemini 2.5 Pro1156$3.691.05M7
74Nemotron 3 Ultra1149$1.09203K4
75GPT-5.3-Codex1149$5.17400K3
76Qwen3 Coder 480B A35B1147$0.666262K3
77Mistral Large 3 25121145$0.760262K2
78Claude Sonnet 41145$6.16200K2
79R1 05281142$1.18164K4
80GLM 4.5 Air1141$0.343131K3
81MiniMax M21139$0.666205K2
82Mistral Medium 3.11123$0.821131K3
83Trinity Large Thinking1121$0.403262K1
84Claude Haiku 4.51119$2.15200K8
85GPT-5 Mini1119$0.738400K4
86DeepSeek V3.11116$0.808164K5
87DeepSeek V31112$0.634128K2
88Gemini 2.5 Flash1108$0.9161.05M7
89Kimi K2 09051102$1.47262K1
90GPT-5.1-Codex-Mini1098$0.742400K1
91GPT-5 Nano1088$0.148400K4
92Gemini 3.1 Flash Lite Preview1076$0.5881.05M3
93Mistral Medium 31073$0.821131K3
94Ministral 3 14B 25121069$0.170262K3
95Ministral 3 8B 25121057$0.128262K3
96Qwen3 235B A22B Instruct 25071042$0.405262K7
97Qwen3 235B A22B Thinking 25071037$1.59128K1
98Kimi K2 07111037$1.37131K1
99GPT-4.11029$3.721.05M3
100o31024$3.72200K1
101Mercury 21022$0.363128K1
102Ministral 3 3B 25121014$0.085131K3
103Codestral 25081011$0.456256K2
104GPT-4.1 Mini997$0.7441.05M3
105o4 Mini980$2.05200K1
106gpt-oss-120b967$0.285131K24
107GPT-4.1 Nano967$0.1861.05M3
108Qwen3 30B A3B946$0.29441K1
109Mistral Small 3.2 24B911$0.193128K4
110Llama 4 Maverick883$0.462524K4
111GPT-4o864$5.10128K2
112Llama 4 Scout793$0.393328K3

Other tasks

Elo comes from head-to-head build-offs via OpenRouter, compiled 12 October 2026 and refreshed daily. Cost is the median across every host serving each model, priced on 1,200 input and 300 output tokens with 60% cached. See the findings for method, or download the data.