Codestral pricing
Codestral API cost from Mistral — $0.300 per 1M input tokens and $0.900 per 1M output tokens. Code-specialised. Estimate your real monthly bill below, then compare it against every other model.
Balanced 32K context · all prices USD per 1M tokens, list price last verified 2026-06-27.
Codestral capabilities & limits
Representative specs for this tier — confirm exact limits in the Mistral docs.
API acting up? Check Mistral status ↗ · all AI API status
Call Codestral from your code
The exact model string and endpoint to use. Works with the OpenAI SDK — just point base_url at the URL below.
codestral-latesthttps://api.mistral.ai/v1MISTRAL_API_KEYcurl https://api.mistral.ai/v1/chat/completions \
-H "Authorization: Bearer $MISTRAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "codestral-latest",
"messages": [{"role": "user", "content": "Hello"}]
}' Model strings follow each provider's naming convention; confirm the current id in the Mistral docs before relying on it.
What a Codestral API call actually costs
Blended input + output cost at Codestral's list rates — useful yardsticks before you commit to volume.
Codestral cost calculator
Enter your monthly volume to estimate the Codestral bill. Runs entirely in your browser.
Mistral models — Codestral in context
How Codestral prices against its siblings. Cheapest reference cost first.
| Model | Input /1M | Output /1M | Cost / call* | Context | Type |
|---|---|---|---|---|---|
| Mistral Small 4 | $0.150 | $0.600 | $0.0007 | 128K | Fast / cheap |
| Codestral Code-specialised | $0.300 | $0.900 | $0.0012 | 32K | Balanced |
| Mistral Large 3 Flagship | $0.500 | $1.50 | $0.0020 | 256K | Flagship |
| Mistral Medium 3.5 | $1.50 | $7.50 | $0.0090 | 256K | Balanced |
*Reference cost of one call with 1,000 input + 1,000 output tokens — a neutral yardstick. Use the calculator for your real usage. Cheapest row highlighted.
How Codestral pricing works
Codestral is billed per token: a lower input price of $0.300 per million tokens for everything you send, and a higher output price of $0.900 per million for everything the model generates. To turn that into a real Codestral bill, multiply by your monthly request volume and average prompt/response length — the calculator above does exactly that.
Codestral does not list a separate cached-input rate, so every input token bills at $0.300 per million. If repeated context is a big part of your prompts, a model with prompt caching may end up cheaper in practice.
List prices move fast — always confirm the current numbers on the official Mistral pricing page before relying on them for budgeting.
Codestral pricing FAQ
How much does the Codestral API cost?
Codestral costs $0.300 per 1M input tokens and $0.900 per 1M output tokens. A typical 3K-input / 500-output call works out to about $0.0014.
What is Codestral's context window?
Codestral has a 32K-token context window. Tokens you put in the prompt are billed at the $0.300 per 1M input rate.
Does Codestral charge extra for output tokens?
Yes. Output (generated) tokens cost $0.900 per 1M, versus $0.300 per 1M for input — about 3.0× more, which is normal for LLM APIs.
Is there a cheaper alternative to Codestral?
In the same balanced tier, Command R (Cohere) is cheaper at $0.150 in / $0.600 out. The overall cheapest model on the market is Gemini 1.5 Flash-8B.