Skip to content

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.06 for Muse Wonder.

120 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 ratedMuse Wonder1392 Elo · $8.06 / 1k tasks
Best valueMuse Spark 1.31353 Elo · $1.98 / 1k tasks

Nothing cheaper is as good

7 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. 1Solar Mini 41126 Elo$0.088 / 1k524K context
  2. 2DeepSeek V4 Flash 04231195 Elo$0.152 / 1k1.05M contextfp4 on some hosts
  3. 3DeepSeek V4 Flash 07311218 Elo$0.168 / 1k1.05M contextfp4 on some hosts
  4. 4Claude Haiku 5.51278 Elo$0.215 / 1k1.00M context
  5. 5MiMo-V2.6-Pro1316 Elo$0.472 / 1k1.05M context
  6. 6Muse Spark 1.31353 Elo$1.98 / 1k1.05M context
  7. 7Muse Wonder1392 Elo$8.06 / 1k1.05M 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
1Muse Wonder1392$8.061.05M2
2Claude Opus 5.51385$8.861.00M11
3Claude Fable 5.21375$15.981.00M5
4GPT-6.1 Sol1361$4.431.05M9
5Muse Spark 1.31353$1.981.05M2
6Kimi K31351$6.041.05M28
7Gemini 4 Carbon1350$4.431.05M7
8Kimi K3.1 Pro1350$4.131.05M24
9Claude Sonnet 5.51346$4.231.00M10
10Gemini 4 Hydrogen1333$3.321.05M7
11Claude Fable 5.11330$19.981.00M5
12Gemini 4 Argon1326$4.231.05M6
13Claude Opus 51317$11.251.00M11
14MiMo-V2.6-Pro1316$0.4721.05M5
15Muse Spark 1.21306$1.981.05M1
16Claude Fable 51301$20.521.00M7
17Muse Spark Open1299$1.981.05M5
18Gemini 3.7 Flash1298$1.541.05M7
19Gemini 3.8 Flash1292$1.541.05M7
20DeepSeek V4.1 Flash 10171287$0.2891.05M48
21GLM 5.31284$1.971.05M49
22Grok 4.61279$3.40500K6
23Gemini 3.6 Flash1279$1.541.05M7
24Claude Haiku 5.51278$0.2151.00M10
25Claude Opus 4.61278$10.261.00M6
26GLM 5.21276$1.931.05M34
27GLM 5.3 Flash1267$0.2411.05M42
28Claude Sonnet 51267$4.301.00M10
29Grok 4.71266$3.26500K6
30Muse Spark 1.11266$1.981.05M1
31Qwen3.7 Max1265$2.611.00M2
32Claude Sonnet 4.61265$6.161.00M9
33Grok 4.51264$4.36500K4
34Kimi K2.61262$1.52262K17
35MiMo-V2.5-Pro1261$0.6231.02M2
36GLM 5.11260$2.17203K11
37Qwen3.7 Plus1259$0.5841.00M2
38Gemini 3.5 Flash1256$3.531.05M7
39Mistral Large 41255$1.061.05M2
40Hy41253$0.5901.05M1
41MiMo-V2.51252$0.8501.00M1
42GLM 5 Turbo1251$1.95203K1
43GPT-5.51249$12.901.05M7
44Kimi K2.7 Code1243$1.70262K11
45Claude Opus 4.81243$11.251.00M11
46MiniMax M31236$0.527524K8
47GLM 51236$1.58203K9
48Gemini 3.1 Pro Preview1233$4.701.05M6
49Claude Opus 4.51231$10.26200K6
50DeepSeek V4 Pro 04231230$1.711.05M15
51Kimi K2.51226$1.22262K5
52Qwen3.6 Plus1225$0.9751.00M1
53Beam 1.0 501B A23B1224$0.5811.05M5
54MiniMax M2.71223$0.621197K2
55DeepSeek V4 Flash 07311218$0.1681.05M29
56GLM 5V Turbo1218$1.95203K1
57Grok 4.201210$2.172.00M4
58GLM 4.71206$0.917203K6
59GPT-5.41201$6.451.05M7
60MiniMax M2.51196$0.546197K4
61DeepSeek V4 Flash 04231195$0.1521.05M15
62Inkling1193$1.82524K1
63Gemini 3 Flash Preview1179$1.181.05M6
64Grok 4.31175$2.171.00M4
65Claude Sonnet 4.51172$6.161.00M7
66Solar Pro 41170$0.274524K3
67Step 3.7 Flash1169$0.470262K2
68Qwen3.5 397B A17B1169$1.51262K10
69GLM 4.7 Flash1167$0.198131K2
70Hy31165$0.265262K4
71DeepSeek V3.1 Terminus1165$0.624164K1
72GPT-5.11160$3.69400K5
73DeepSeek V3.2 Exp1160$0.447164K1
74Claude Opus 4.11160$30.78200K1
75Muse Glimmer 30B1159$0.590131K2
76GPT-5.21159$5.17400K4
77GPT-51157$3.69400K3
78Qwen3.5 Plus 2026-02-151156$0.7801.00M1
79GLM 4.61155$0.912203K5
80GLM 4.51154$1.03131K1
81DeepSeek V3.21153$0.338164K6
82GPT-5.1-Codex1142$3.69400K1
83Gemini 2.5 Pro1142$3.691.05M3
84Nemotron 3.5 Super VL1140$0.236262K10
85GPT-5.3-Codex1134$5.17400K3
86Qwen3 Coder 480B A35B1132$0.603262K2
87Nemotron 3 Ultra1131$1.04262K6
88Mistral Large 3 25121131$0.760262K2
89R1 05281128$1.15164K3
90Solar Mini 41126$0.088524K2
91GLM 4.5 Air1126$0.343131K3
92Mistral Medium 3.11110$0.860131K2
93Claude Haiku 4.51104$2.15200K8
94GPT-5 Mini1104$0.738400K4
95DeepSeek V3.11101$0.523164K3
96DeepSeek V31097$0.576164K3
97Gemini 2.5 Flash1093$0.9161.05M3
98Kimi K2 09051087$1.47262K1
99GPT-5.1-Codex-Mini1083$0.742400K1
100GPT-5 Nano1073$0.148400K4
101Gemini 3.1 Flash Lite Preview1061$0.5881.05M3
102Mistral Medium 31058$0.860131K2
103Ministral 3 14B 25121054$0.178262K2
104Ministral 3 8B 25121042$0.134262K2
105Qwen3 235B A22B Instruct 25071028$0.304262K6
106Kimi K2 07111023$1.37131K1
107Qwen3 235B A22B Thinking 25071022$1.59128K1
108GPT-4.11015$3.721.05M3
109o31009$3.72200K1
110Ministral 3 3B 2512999$0.089131K2
111Codestral 2508996$0.456256K2
112GPT-4.1 Mini983$0.7441.05M3
113o4 Mini (batch)965$1.02200Kn/a
114gpt-oss-120b952$0.244131K26
115GPT-4.1 Nano952$0.1981.05M2
116Qwen3 30B A3B931$0.26541K2
117Mistral Small 3.2 24B896$0.134128K6
118Llama 4 Maverick869$0.613524K2
119GPT-4o850$5.10128K2
120Llama 4 Scout779$0.263328K4

Other tasks

Elo comes from head-to-head build-offs via OpenRouter, compiled 16 November 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.