impulse

Codestral

API id codestral-latest
Input / 1M
$0.30
at Mistral AI
Output / 1M
$0.90
at Mistral AI
Context window
128K
tokens
Max output
128K
tokens per reply
Hosts
5
6 listings
Released
-
date not published

Pricing

List prices at Mistral AI, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$0.30$0.90
Cached input
90% off input
$0.03

What it costs a month

At Mistral AI list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out, cached$133
  • RAG over documents2,000 requests a day, 8K in / 0.6K out, cached$112
  • Coding agent1,000 requests a day, 40K in / 2K out, cached$187
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$936
Use your own numbers

Where to run it

5 hosts serve Codestral. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
Mistral AILab API
codestral-latest
$0.30 / $0.90
codestral-latest
-
codestral-latest
-
codestral@2405
$0.20 / $0.60
−33% vs headline
codestral
$0.30 / $0.90
Show 1 more listings: regions, snapshots and variants
Vertex AI
Alias
codestral@latest
$0.20 / $0.60
−33% vs headline

Capabilities

Core

  • Streaming
  • Function calling
  • JSON mode
  • Structured outputs

Multimodal

  • Vision
  • Image input
  • Audio
  • Image generation
  • Video

Advanced

  • Reasoning
  • Tool calling
  • MCP
  • Prompt caching
  • Batch API
  • Embeddings
Takes in
Text
Produces
Text
Features
Assistant prefill

Cheaper alternatives

Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.

Same model, cheaper host

  • Vertex AI
    codestral@2405
    $0.20 / $0.60
    33% less
  • Vertex AI
    codestral@latest
    $0.20 / $0.60
    33% less

Smaller Mistral AI models

  • Magistral Small
    Mistral AI · on Mistral AI
    $0.15 / $0.60
    Has every key capability
    42% less
  • Mistral Vibe Cli Fast
    Mistral AI · on Mistral AI
    $0.15 / $0.60
    Has every key capability
    42% less
  • Zai Glm 5.3 Flash
    Mistral AI · on Mistral AI
    $0.15 / $0.50
    Has every key capability
    47% less

Other frontier labs

  • Claude Haiku 5.5
    Anthropic · on Anthropic
    $0.10 / $0.50
    Has every key capability
    56% less
  • GPT-6 Luna
    OpenAI · on OpenAI
    $0.10 / $0.50
    Has every key capability
    56% less
  • GPT-4o Mini
    OpenAI · on OpenAI
    $0.15 / $0.60
    Has every key capability
    42% less

Open-weight picks

  • MiMo V2.6 Pro
    Xiaomi · on GMI Cloud
    $0.348 / $0.696
    Has every key capability
    3% less
  • Qwen3.5 397B A17B
    Alibaba Qwen · on AIHubMix
    $0.164 / $0.986
    Has every key capability
    18% less
  • Muse Glimmer 30B
    Meta · on EmpirioLabs AI
    $0.20 / $0.80
    Has every key capability
    22% less
  • Mistral Small 2603
    Mistral AI · on Mistral AI
    $0.15 / $0.60
    Has every key capability
    42% less

Benchmarks

Scores published on the model card.

  • Aider Polyglot11.1%

Call it

Using Mistral AI's API.

Python
from litellm import completion

response = completion(
    model="mistral/codestral-latest",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

How much does Codestral cost?

On Mistral AI, Codestral costs $0.30 per million input tokens and $0.90 per million output tokens. Cached input costs $0.03 per million tokens. The cheapest host is Vertex AI, at $0.20 per million input tokens and $0.60 per million output tokens.

Which APIs offer Codestral?

Codestral runs on 5 APIs: Mistral AI, Mistral Codestral, Mistral Codestral FIM, Vertex AI and Vercel AI Gateway.

What is Codestral's context window?

128K tokens, with up to 128K tokens in one reply.

Is Codestral being retired?

No retirement date is scheduled for it on any API we track.

What are cheaper alternatives to Codestral?

Models that cost less and keep most of what it can do: Magistral Small on Mistral AI (42% less), Claude Haiku 5.5 on Anthropic (56% less), GPT-6 Luna on OpenAI (56% less) and MiMo V2.6 Pro on GMI Cloud (3% less). Codestral itself costs 33% less on Vertex AI. Savings are on a mix of 3 input tokens to 1 output token.

What is Codestral's API model id?

Use codestral-latest with Mistral AI. Other hosts use their own ids: codestral@2405 on Vertex AI, codestral on Vercel AI Gateway.

Sources

Raw catalog entry for codestral-latest on Mistral AI
{
  "cache_read_input_token_cost": 3e-8,
  "input_cost_per_token": 3e-7,
  "litellm_provider": "mistral",
  "max_input_tokens": 128000,
  "max_output_tokens": 128000,
  "mode": "chat",
  "output_cost_per_token": 9e-7,
  "source": "https://docs.mistral.ai/models/model-cards/codestral-25-08",
  "supports_assistant_prefill": true,
  "supports_function_calling": true,
  "supports_response_schema": true,
  "supports_tool_choice": true
}