Best AI models for coding
Ranked by SWE-bench Verified: the share of real bugs from real open-source projects that each model fixes on its own. Tested independently by Epoch AI, shown with current API prices.
Our picks
The ranking
Compare the top two| # | Model | SWE-bench Verifiedi | Overall indexi | Inputi | Outputi | Contexti |
|---|---|---|---|---|---|---|
| 1 | Claude Opus 4.7Anthropic | 83.5% | 156.4 | $5 | $25 | 1M |
| 2 | Gemini 3.5 FlashGoogle DeepMind | 79.3% | 154.6 | $1.50 | $9 | 1M |
| 3 | GLM 5.2Z.ai (Zhipu) | 78.7% | 151.8 | $0.14 | $3.99 | 1M |
| 4 | Claude Opus 4.6Anthropic | 78.7% | 155.4 | $5 | $25 | 1M |
| 5 | DeepSeek V4 Pro 0813DeepSeek | 77.6% | 155.4 | $0.66 | $1.98 | 1M |
| 6 | Qwen3.7 MaxAlibaba Qwen | 77.3% | 153.7 | $1.48 | $4.43 | 1M |
| 7 | GPT-5.4OpenAI | 76.9% | 156.9 | $2.50 | $15 | 1.1M |
| 8 | Qwen3.6 Max PreviewAlibaba Qwen | 76.7% | 149.3 | $1.03 | $6.16 | 256K |
| 9 | Kimi K2.6Moonshot AI | 76.7% | 151.0 | $0.65 | $3.41 | 256K |
| 10 | Claude Opus 4.5Anthropic | 76.7% | 150.1 | $5 | $25 | 200K |
per 1M tokens · USD
Quick answers
- Which AI model is best for coding?
- Claude Opus 4.7 from Anthropic leads this ranking (SWE-bench Verified: 83.5%). It costs $5 per million input tokens and $25 per million output tokens.
- Is there a cheaper alternative?
- DeepSeek V4 Pro 0813 from DeepSeek (SWE-bench Verified: 77.6%) costs $0.66 / $1.98 per million tokens, about 10× less than Claude Opus 4.7.
How we rank
Scores come from tests run independently by Epoch AI (CC BY 4.0), not from the companies’ own announcements. Prices come from OpenRouter’s public API. Both are refreshed automatically several times a day, so this ranking follows new releases and price changes.
Other rankings
MathScienceCheapFreeOpen sourceLong contextImages & PDFsRankings →