Codestral is Mistral AI's language model with a 256K context window and up to 8K output tokens, available from 5 providers, starting at $0.2 / 1M input and $0.6 / 1M output. Mistral AI's dedicated code generation model supporting fill-in-the-middle, code correction, and agentic software engineering tasks.
Specifications
Canonical IDmistral-codestral
TypeLanguage
StatusActive
CreatorMistral AIMistral AI
Providers
Context Window256K tokens
Max Output8K tokens
Input ModalitiesText
Output ModalitiesText
Release Date · 11 months ago
Knowledge Cutoff · 1 year ago

Capabilities

Input1/5
Text
Image·
Audio·
Video·
PDF·
Output1/5
Text
Image·
Audio·
Video·
Embedding·
Capabilities4/13
Reasoning·
Adaptive Reasoning·
Function Calling
Parallel Function Calling·
Structured Outputs
Native JSON Schema
Web Search·
URL Context·
Computer Use·
Code Execution·
File Search·
Prompt Caching·
Assistant Prefill

Pricing by Provider

US Dollar ($)
Per 1M tokens
ProviderStandardBatch
Input
$ / 1M
Output
$ / 1M
Cache Read
$ / 1M
Input
$ / 1M
Output
$ / 1M
Azure AI Foundry logo
Azure AI Foundry
mistral:codestral
$0.3$0.9N/A
Google Vertex AI logo
Google Vertex AI
vertex_ai/codestral-2501
$0.2$0.6N/A
Mistral AI logo
Mistral AI
codestral
$0.3$0.9N/A$0.15$0.45
OpenRouter logo
OpenRouter
mistralai/codestral-2508
$0.3$0.9$0.03
Vercel AI Gateway logo
Vercel AI Gateway
mistral/codestral
$0.3$0.9N/A

Cost Calculator

US Dollar ($)
Preset:

Versions

VersionReleasedContextInput / 1MOutput / 1MStatus
Codestral 2128K$0.300$0.900Available
Codestral256K$0.200$0.600Current
Mamba Codestral 7B256K$0.250$0.250Available
Mamba Codestral 7B256K$0.190$0.190Available

Model IDs

codestral-2508
codestral-latest
codestral/codestral-2405
codestral/codestral-latest
mistral-codestral
mistral/codestral
mistral/codestral-2405
mistral/codestral-2508
mistral/codestral-latest
mistralai/codestral-2508
text-completion-codestral/codestral-2405
text-completion-codestral/codestral-latest
vercel_ai_gateway/mistral/codestral
vertex_ai/codestral-2501
vertex_ai/codestral@2405
vertex_ai/codestral@latest