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.

Context
128K tokens
Max output
33K

Hosted API price

List price via Mistral · per 1M tokens

USD
Input
$0.30 /1M
Output
$0.90 /1M
Hosted by
Mistral Azure 2 providers

Hosted API pricing

How we price

Order

Providers are listed cheapest input rate first, then by output rate, a tie going to the creator's own listing. A provider that lists the model without a published rate sits at the end.

Prices

Base-tier, on-demand rates in USD per 1M tokens, converted at ECB reference rates where a provider publishes in another currency. Cached-input and batch rates show only where a provider publishes them. "Cheapest" marks the one provider with the lowest input and output pair; a tie wears no badge.

Cost

Input rate times the input tokens plus output rate times the output tokens, at the monthly volume set above the table. Cached-input, batch, long-context and reasoning-token billing are not modelled.

Transparency and funding

  • Affiliates: Affiliate links are marked. We may earn a commission if you click them, but commissions never affect the order.

Every provider serving Codestral, cheapest input first. Set your monthly volume to see what each would bill.

Every provider serving Codestral, with its price per 1M input and output tokens and what the volume above would cost
Provider Input /1M Output /1M Cost at 10M in + 2M out Link
Mistral logo Mistral Creator $0.30 $0.90 $4.80 Visit website
Microsoft Azure logo Azure $0.30 $0.90 $4.80 Visit website

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.

Models priced nearest Codestral per 1M tokens, each at its cheapest provider
Model Blended /1M Input /1M Output /1M Context Cutoff vs Codestral
OpenAI GPT-5.6 Luna OpenAI $0.3667 $0.20 $1.20 1M Feb 2026 −8%
OpenAI GPT-5.4 Nano OpenAI $0.375 $0.20 $1.25 400K Aug 2025 −6%
Alibaba Cloud Qwen2.5-72B Instruct Alibaba Cloud $0.3833 $0.38 $0.40 33K −4%
DeepSeek DeepSeek V3.1 DeepSeek $0.3917 $0.27 $1.00 131K −2%
DeepSeek DeepSeek V3.1 Terminus DeepSeek $0.3917 $0.27 $1.00 131K −2%
Mistral Codestral This model Mistral $0.40 $0.30 $0.90 128K
DeepSeek DeepSeek V3 DeepSeek $0.4117 $0.27 $1.12 128K +3%
Alibaba Cloud Qwen3.7-Plus Alibaba Cloud $0.4135 $0.276 $1.101 1M +3%
Alibaba Cloud Qwen3-VL-Plus Alibaba Cloud $0.4333 $0.20 $1.60 262K +8%
DeepSeek DeepSeek V4.1 Flash DeepSeek $0.45 $0.30 $1.20 1M +13%
MiniMax MiniMax-M2.5 MiniMax $0.45 $0.30 $1.20 205K +13%

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.

Capabilities

What Codestral accepts and can do, as published by Mistral.

  • Text Accepts and generates natural-language text.
  • 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.

Common 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

  • Mistral Large 3 Open weights 256K context
    From $0.50 / $1.50 /1M in / out at the cheapest provider
  • Mistral Small 4 Open weights 256K context
    From $0.15 / $0.60 /1M in / out at the cheapest provider
  • Ministral 3 14B Open weights 256K context
    From $0.20 / $0.20 /1M in / out at the cheapest provider
  • Ministral 3 8B Open weights 256K context
    From $0.15 / $0.15 /1M in / out at the cheapest provider
  • Ministral 3 3B Open weights 256K context
    From $0.10 / $0.10 /1M in / out at the cheapest provider
  • Mistral Medium 3.5 Open weights 256K context
    From $1.50 / $7.50 /1M in / out at the cheapest provider
  • Mistral NeMo Open weights 128K context
    From $0.04 / $0.17 /1M in / out at the cheapest provider
  • Devstral Medium 128K context