Codestral pricing
Mistral AI · API id codestral-2508 · verified 2026-10-18
| Input | $0.30 |
| Cached input (cache hit) | $0.03 |
| Cache write | — |
| Output | $0.90 |
| Batch discount | 50% |
| Context window | 128,000 tokens |
| Max output | — |
USD per 1M tokens unless noted. Official source
Estimate your workload on Codestral →
What Codestral costs for real workloads
| Workload | Codestral | Ministral 3 8B | Claude Haiku 5.5 | GPT-6 Luna | Mistral Small 4 |
|---|---|---|---|---|---|
| 10,000 chatbot replies 2,000 input + 400 output tokens each, 50% of the prompt cached | $6.90 | $2.25 | $3.10 | $3.10 | $4.05 |
| One 30-step coding agent run 12K system + tools prompt, 1K output and 3K tool result per step, caching on | $0.13 | $0.05 | $0.12 | $0.05 | $0.07 |
| 1M documents classified (batch) 600 input + 20 output tokens each, batch API where available | $99.00 | $46.50 | $35.00 | $35.00 | $51.00 |
Compared with the cheapest other small models. Change the numbers in the calculator.
Billing notes
Code model. Alias codestral-latest. Batch 50% off per mistral.ai/pricing. Max output not published.
Where Codestral ranks by use case
Position by cost among all models that fit each workload (1 = cheapest).
- Cheapest LLM for coding agents: #7 of 36 (Per run (cached): $0.13)
- Cheapest LLM for RAG chatbots: #6 of 36 (Per 1,000 answers: $1.76)
- Cheapest LLM for batch classification and extraction: #7 of 36 (Classify 1M docs: $99.00)
- Cheapest LLM for high-volume customer support: #6 of 36 (Per 1,000 replies: $0.61)
Counting tokens for a prompt? The token counter estimates Codestral tokens (xAI, DeepSeek, Mistral tokenizer, estimated) and input cost.
Head-to-head comparisons
Other Mistral AI models
- Mistral Large 4: $0.68 / $2.09
- Mistral Medium 3.5: $1.50 / $7.50
- Mistral Small 4: $0.15 / $0.60
- Ministral 3 8B: $0.15 / $0.15
FAQ
How much does Codestral cost per 1M tokens?
Codestral costs $0.30 per 1M input tokens and $0.90 per 1M output tokens at standard rates (verified 2026-10-18).
Does Codestral support prompt caching?
Yes. Cached input is billed at $0.03 per 1M tokens.
Is there a batch discount for Codestral?
Yes. The batch API is 50% cheaper than standard requests.
What is the context window of Codestral?
128,000 tokens.