Codestral Pricing
FastMistral · 32K tokens context
Codestral from Mistral costs $0.300 per 1 million input tokens and $0.900 per 1 million output tokens as of May 2026. The model supports a 32,000-token context window (approximately 24,000 words) with a 4K-token maximum output. A typical 1,000-token request costs $0.0003 in input charges; a 10,000-token request costs $0.0030.
| Input price | $0.300 / 1M tokens |
|---|---|
| Output price | $0.900 / 1M tokens |
| Output / input ratio | 3.0× |
| Context window | 32,000 tokens (~24,000 words) |
| Maximum output | 4,096 tokens |
| Cost per 1K tokens (input) | $0.0003 |
| Tier | Fast |
| Last verified |
Codestral is Mistral's code-specialized model — purpose-built for code generation, completion, and refactoring. Outperforms general-purpose models of similar size on coding benchmarks.
Input Price
$0.300
per 1 million tokens
Output Price
$0.900
per 1 million tokens
Context Window
32K tokens
max 4K output
Cost Examples
| Request Type | Tokens | Input Cost | Output Cost |
|---|---|---|---|
| 1,000 word article | 1,333 | $0.0004 | $0.00036 |
| 10-page document (2,500 words) | 3,333 | $0.001 | $0.0009 |
| 1,000 lines of code | 5,000 | $0.0015 | $0.00135 |
| 100K token document | 100,000 | $0.03 | $0.027 |
Output cost estimated at 30% of input token count. Use the calculator for exact figures.
Strengths
- ✓Code-specialized training
- ✓Cheap for a code model
- ✓Fill-in-the-middle support
Limitations
- –Not for non-code tasks
- –32K context window
Best Use Cases
Calculate Codestral Costs
Use the TokenRate calculator to convert any budget, token count, or text into exact Codestral costs — and compare across all models.
Open Calculator →Codestral — FAQ
Related Models
Related Guides