Mistral logo

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.

List price via Mistral
Input
$0.30 / 1M tokens
Output
$0.90 / 1M tokens
Mistral Azure 2 providers

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
Mistral logo Mistral Creator $0.30 $0.90 $4.80 View
Microsoft Azure logo Azure $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 vs Codestral
OpenAI GPT-5.6 Luna OpenAI $0.3667 −8%
OpenAI GPT-5.4 Nano OpenAI $0.375 −6%
Alibaba Cloud Qwen2.5-72B Instruct Alibaba Cloud $0.3833 −4%
DeepSeek DeepSeek V3.1 DeepSeek $0.3917 −2%
DeepSeek DeepSeek V3.1 Terminus DeepSeek $0.3917 −2%
Mistral Codestral This model Mistral $0.40
DeepSeek DeepSeek V3 DeepSeek $0.4117 +3%
Alibaba Cloud Qwen3.7-Plus Alibaba Cloud $0.4167 +4%
Alibaba Cloud Qwen3-VL-Plus Alibaba Cloud $0.4333 +8%
DeepSeek DeepSeek V4.1 Flash DeepSeek $0.45 +13%
MiniMax MiniMax-M2.5 MiniMax $0.45 +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
Mistral Mistral Large 3 Open weights 256K $0.50 $1.50
Mistral Mistral Small 4 Open weights 256K $0.15 $0.60
Mistral Ministral 3 14B Open weights 256K $0.20 $0.20
Mistral Ministral 3 8B Open weights 256K $0.15 $0.15
Mistral Ministral 3 3B Open weights 256K $0.10 $0.10
Mistral Mistral Medium 3.5 Open weights 256K $1.50 $7.50
Mistral Mistral NeMo Open weights 128K $0.04 $0.17
Mistral Devstral Medium 128K