Best AI model for writing & editing code

General programming: writing functions, refactoring, explaining code, debugging. Ranked by Arena text / coding, priced against live API rates. 44 models have a published score on this board.

Capability published 2026-09-02 · pricing retrieved 2026-09-10

Most capable
Claude Opus 4.6
Anthropic
$10.00 / 1M blended
100% of leader strength
anthropic/claude-opus-4.6
Best value
GLM 5.3 Flash
Z.ai (Zhipu)
$0.24 / 1M blended
95% of leader strength · 98% cheaper
z-ai/glm-5.3-flash
Budget
DeepSeek V4 Flash 0731
DeepSeek
$0.10 / 1M blended
78% of leader strength · 99% cheaper
deepseek/deepseek-v4-flash-0731
Best for agents
GLM 5.3 Flash
Z.ai (Zhipu)
$0.24 / 1M blended
95% of leader strength · 98% cheaper
z-ai/glm-5.3-flash

Top 25 models for writing & editing code

Rows marked frontier are Pareto-optimal — nothing we track is both stronger and cheaper. "Strength" rescales the board so 100% = parity with the leader.

#ModelProviderScoreStrength$/1MContextTools
1 Claude Opus 4.6
anthropic/claude-opus-4.6
Anthropic 1534 100% $10.001M tools
2 Claude Opus 5
anthropic/claude-opus-5
Anthropic 1532 99% $10.001M tools
3 Claude Fable 5
anthropic/claude-fable-5
Anthropic 1519 96% $20.001M tools
4 GLM 5.3 Flash
z-ai/glm-5.3-flash
Z.ai (Zhipu) 1516 95% $0.241.31072M tools
5 Gemini 3.8 Flash
google/gemini-3.8-flash
Google 1516 95% $1.501.048576M tools
6 Claude Opus 4.7
anthropic/claude-opus-4.7
Anthropic 1516 95% $10.001M tools
7 Kimi K3
moonshotai/kimi-k3
Moonshot AI 1511 93% $6.001.048576M tools
8 Claude Fable 5.1
anthropic/claude-fable-5.1
Anthropic 1508 93% $20.001M tools
9 Gemini 3.7 Flash
google/gemini-3.7-flash
Google 1504 91% $1.501.048576M tools
10 Claude Sonnet 4.6
anthropic/claude-sonnet-4.6
Anthropic 1504 91% $6.001M tools
11 GLM 5.3
z-ai/glm-5.3
Z.ai (Zhipu) 1503 91% $2.151.31072M tools
12 Qwen3.8 Max (0902)
qwen/qwen3.8-max-0902
Qwen (Alibaba) 1498 90% $3.001M tools
13 Qwen3.7 Max
qwen/qwen3.7-max
Qwen (Alibaba) 1498 90% $2.211M tools
14 Gemini 3.5 Flash
google/gemini-3.5-flash
Google 1493 88% $3.381.048576M tools
15 Gemini 3.6 Flash
google/gemini-3.6-flash
Google 1492 88% $1.501.048576M tools
16 GPT-5.6 Sol
openai/gpt-5.6-sol
OpenAI 1490 88% $4.001.05M tools
17 GLM 5.1
z-ai/glm-5.1
Z.ai (Zhipu) 1487 86% $1.49205K tools
18 GPT-5.6 Terra
openai/gpt-5.6-terra
OpenAI 1487 86% $4.501.05M tools
19 Kimi K2.6
moonshotai/kimi-k2.6
Moonshot AI 1487 86% $1.71262K tools
20 Claude Sonnet 5
anthropic/claude-sonnet-5
Anthropic 1485 86% $4.001M tools
21 Kimi K2.5
moonshotai/kimi-k2.5
Moonshot AI 1485 86% $0.90262K tools
22 Claude Opus 4.8
anthropic/claude-opus-4.8
Anthropic 1485 86% $10.001M tools
23 Grok 4.5
x-ai/grok-4.5
xAI 1483 85% $3.00500K tools
24 GLM 5.2
z-ai/glm-5.2
Z.ai (Zhipu) 1479 84% $1.491.048576M tools
25 Qwen3.8 27B
qwen/qwen3.8-27b
Qwen (Alibaba) 1477 84% $1.061M tools

Capability: Arena leaderboard dataset (CC-BY-4.0), Arena text / coding, published 2026-09-02. Pricing: OpenRouter, retrieved 2026-09-10. (input x 3 + output x 1) / 4.

What this measures: Human pairwise preference votes. Measures perceived answer quality on this category, not correctness on a fixed test set. For each model this is the probability it beats the board leader in a head-to-head human vote — 0.50 means a dead tie and is the best possible value.

Get this as JSON

curl -s https://agentleaderboards.com/api/v1/route/coding.json | jq .picks

No key, open CORS, refreshed daily. Set your own budget and constraints →

Other tasks