Best LLM API for Coding
Compare LLM API pricing and capabilities for coding tasks. Find the best model for code generation, debugging, and software development at the lowest token cost.
Cost calculator for this use case
🥇 voyage-code-3
$—
🥈 Codestral
$—
🥉 Codestral 2508
$—
Full ranking — top 10 models
| # | Model | Provider | Input $/Mtok | Output $/Mtok | Blended | Context | |
|---|---|---|---|---|---|---|---|
| 1 | voyage-code-3 | Voyage AI | $0.180 | $0.180 | $0.180 | 32K | → |
| 2 | Codestral | Mistral | $0.300 | $0.900 | $0.600 | 256K | → |
| 3 | Codestral 2508 | Mistral | $0.300 | $0.900 | $0.600 | 256K | → |
| 4 | Devstral 2 2512 | Mistral | $0.400 | $2.00 | $1.20 | 256K | → |
| 5 | Grok Build 0.1 | xAI | $1.00 | $2.00 | $1.50 | 256K | → |
| 6 | Kimi K2.7 Code | Fireworks | $0.950 | $4.00 | $2.48 | 256K | → |
| 7 | Kimi K2.7 Code | Moonshot | $0.950 | $4.00 | $2.48 | 262K | → |
| 8 | Kimi K2.7 Code | Together | $0.950 | $4.00 | $2.48 | 256K | → |
| 9 | Kimi K2.7 Code HighSpeed | Moonshot | $1.90 | $8.00 | $4.95 | 262K | → |
| 10 | GPT-4.1 | OpenAI | $2.00 | $8.00 | $5.00 | 1M | → |
How models are selected
Models tagged for coding tasks, sorted by blended cost (average of input + output per million tokens).
Prices are per million tokens (Mtok), sourced directly from official provider pricing pages and verified by our automated scraper pipeline that runs 3x daily. "Blended cost" is the average of input and output pricing — a quick proxy for typical 50/50 usage patterns.