Which AI model should I use?
The best models for coding, plus open models you can run yourself, with API prices
An AI model is the brain behind coding assistants like Claude Code, Codex, and Cursor. Your assistant picks a model for you, and most of them let you switch to another one. The best model for coding is the one that gets your work right, and most people pay for it through a subscription instead of per token.
Model Comparison
API prices are per million input and output tokens, for when you pay per use through the API. Scroll to compare all models side by side.
| Feature | Claude Opus 5.5 | Claude Sonnet 5.5 | Claude Fable 5.2 | GPT-6.2 Astra | GPT-6.2 Sol | Gemini 4 Neon |
|---|---|---|---|---|---|---|
| Made by | Anthropic | Anthropic | Anthropic | OpenAI | OpenAI | |
| Coding leaderboards | ✓ Top tier | Close behind | ✓ Top tier | ✓ Top tier | Close behind | ✓ Top tier |
| Default in | Claude Code | Not a default | Not a default | Not a default | Codex | Antigravity |
| API input price | $4 | $2 | $8 | $8 | $2 | $3 |
| API output price | $20 | $10 | $40 | $40 | $10 | $15 |
| Context window | 1M tokens | 1M tokens | 1M tokens | 1.05M tokens | 1.05M tokens | 1M tokens |
| Best for | Everyday agentic coding | Side projects on a budget | The hardest problems | Codex users who want the best | Balanced cost in Codex | Antigravity and Google users |
The Top Coding Models
These are the models worth knowing, and most of them are reasoning models that think before they answer.
Claude Opus 5.5
$4 / $20The model I use every day
- Near the top of every coding leaderboard
- The default model in Claude Code
- Cheaper than the Opus models before it
- Effort levels from Low to Max, starting at Medium
- Only available through Anthropic, AWS, Google Cloud, and Microsoft
- Costs twice as much as Sonnet 5.5
Claude Sonnet 5.5
$2 / $10Anthropic's balance of speed and smarts
- Half the price of Opus 5.5
- Fast enough for quick back-and-forth
- Same 1M-token context window as Opus
- A step behind Opus on hard, multi-step changes
Claude Fable 5.2
$8 / $40Anthropic's most capable model
- Tops several coding leaderboards
- Built for long, demanding agent work
- Twice the price of Opus 5.5
- Single turns can run for many minutes
GPT-6.2 Astra
$8 / $40OpenAI's flagship for reasoning and coding
- Close to the top of coding leaderboards
- 1.05M-token context window
- Available in Codex and ChatGPT
- Prompts over 272K tokens cost twice as much to send
- Not the default in Codex, so you have to pick it
Gemini 4 Neon
$3 / $15Google's top coding model
- Leads some coding leaderboards
- The default model in Antigravity
- Cheaper than Opus 5.5 and GPT-6.2 Astra
- No free API tier for this model
- Fewer coding tools offer it than Claude or GPT
Open Models
Open models publish their weights, so you can run them on your own hardware or pick from many hosts. I haven't used these myself, but they're worth a look if privacy or cost matters more to you than having the very best model. Most of them are too big to run at home, so you'll usually reach them through an API like the others.
| Feature | DeepSeek V4 Pro | Kimi K3 | GLM 5.2 | Qwen3-Coder-Next |
|---|---|---|---|---|
| Made by | DeepSeek | Moonshot AI | Z.ai | Alibaba |
| License | ✓ MIT | Custom, with limits for big companies | ✓ MIT | ✓ Apache 2.0 |
| Size | 1.7T parameters | 2.8T parameters | About 750B parameters | 80B parameters |
| Run it at home | ✗ Too big | ✗ Too big | ✗ Too big | ✓ With about 48GB of memory |
| API input price | $1.32, half off-peak | $3 | $1.40 | Varies by host |
| API output price | $3.96, half off-peak | $15 | $4.40 | Varies by host |
| Best for | Strong and cheap | The biggest open model | Coding agents on a budget | Coding on your own machine |
DeepSeek V4 Pro
$1.32 / $3.96A strong open model at a low price
- MIT license, so you can use it for almost anything
- Half price outside peak hours on the DeepSeek API
- 1M-token context window
- Far too big to run on your own computer
- The DeepSeek API is a Chinese provider, which rules it out for some companies
Kimi K3
$3 / $15The largest open model
- Close to the top closed models on many benchmarks
- Weights are free to download
- Big companies need a separate agreement to use it
- Costs about the same as Gemini 4 Neon through the API
GLM 5.2
$1.40 / $4.40An open model built for coding agents
- MIT license with no regional limits
- Built for coding and long-running agent work
- 1M-token context window
- Too big to run at home
Qwen3-Coder-Next
Free to runA coding model you can run on your own computer
- Runs locally with tools like Ollama and LM Studio
- Only 3B of its 80B parameters work on each token, so it runs fast
- Apache 2.0 license
- Needs about 48GB of memory for the smaller download
- Not as strong as the big hosted models on hard tasks