Codestral
Mistral AI's code generation model with an undisclosed parameter count, trained on more than 80 programming languages. The current 2508 release shipped July 2025.
Key Specifications
- Context window
- 128K tokens
- Max output
- 33K tokens
- Inputs
- Text
- Capabilities Show details
- Function calling Connect to external tools, APIs, and systems. Structured output Return responses in structured formats like JSON. File upload Process uploaded documents, spreadsheets, and other files.
Hosted API pricing
| Provider | Input / 1M tokens | Output / 1M tokens | Cost at 10M in + 2M out | |
|---|---|---|---|---|
|
|
$0.30 | $0.90 | $4.80 | View |
|
|
$0.30 | $0.90 | $4.80 | View |
Heads up: Base-tier, on-demand rates per 1M tokens; cached, batch and long-context tiers excluded. A provider may serve a shorter context or a quantized build than the creator's release. Verify before provisioning. More on how we price.
Similarly priced models
The models nearest Codestral by blended rate, each at its own cheapest provider.
| Model | Blended / 1M | Input / 1M | Output / 1M | Context | Cutoff | vs Codestral |
|---|---|---|---|---|---|---|
|
|
$0.3667 | $0.20 | $1.20 | 1M | Feb 2026 | −8% |
|
|
$0.375 | $0.20 | $1.25 | 400K | Aug 2025 | −6% |
|
|
$0.3833 | $0.38 | $0.40 | 33K | −4% | |
|
|
$0.3917 | $0.27 | $1.00 | 131K | −2% | |
|
|
$0.3917 | $0.27 | $1.00 | 131K | −2% | |
|
|
$0.40 | $0.30 | $0.90 | 128K | ||
|
|
$0.4117 | $0.27 | $1.12 | 128K | +3% | |
|
|
$0.4167 | $0.28 | $1.10 | 1M | +4% | |
|
|
$0.4333 | $0.20 | $1.60 | 262K | +8% | |
|
|
$0.45 | $0.30 | $1.20 | 1M | +13% | |
|
|
$0.45 | $0.30 | $1.20 | 205K | +13% |
Prices are USD per 1M tokens at each model's cheapest listed provider. Blended is the cost of 10M input plus 2M output tokens, spread over the 12M.
Frequently Asked Questions
What is Codestral good for?
High-frequency code completion, fill-in-the-middle and code generation across more than 80 programming languages. It sits in the middle of Mistral's price range.
When is Codestral not a good fit?
Image input: it is text only. Closed weights, so no self-hosting, and its maximum output caps very long single responses.
What is the cheapest way to run Codestral?
The cheapest hosted rate is $0.30 / $0.90 per 1M tokens via Mistral.
Can I self-host Codestral?
No. Mistral does not publish the weights; Codestral is available only through hosted APIs.
More from Mistral
| Model | Context | Input / 1M | Output / 1M |
|---|---|---|---|
|
|
256K | $0.50 | $1.50 |
|
|
256K | $0.15 | $0.60 |
|
|
256K | $0.20 | $0.20 |
|
|
256K | $0.15 | $0.15 |
|
|
256K | $0.10 | $0.10 |
|
|
256K | $1.50 | $7.50 |
|
|
128K | $0.04 | $0.17 |
|
|
128K | ||