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 discount50%
Context window128,000 tokens
Max output—

USD per 1M tokens unless noted. Official source

Estimate your workload on Codestral →

What Codestral costs for real workloads

WorkloadCodestralMinistral 3 8BClaude Haiku 5.5GPT-6 LunaMistral 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).

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

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.