Mistral AI logo

Codestral


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

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

ProviderStandardBatch
Input
$ / 1M
Output
$ / 1M
Cache Read
$ / 1M
Input
$ / 1M
Output
$ / 1M
Google Vertex AI logo
Google Vertex AI
vertex_ai/codestral@latest
$0.200$0.600N/A
Azure AI Foundry logo
Azure AI Foundry
mistral:codestral
$0.300$0.900N/A
Mistral AI logo
Mistral AI
codestral-latest
$0.300$0.900N/A$0.150$0.450
OpenRouter logo
OpenRouter
mistralai/codestral-2508
$0.300$0.900$0.030
Vercel AI Gateway logo
Vercel AI Gateway
mistral/codestral
$0.300$0.900N/A

Regional pricing

Provider-specific pricing that varies by region.
Azure AI Foundry logo
Azure AI Foundry
18 regions
RegionStandard
Input
$ / 1M
Output
$ / 1M
Global
Global$0.300$0.900
Asia Pacific
Southeast Asia (Singapore)/ southeastasia$0.396$1.19
Europe
France Central (Paris)/ francecentral$0.330$0.990
Germany West Central (Frankfurt)/ germanywestcentral$0.330$1.09
Italy North (Milan)/ italynorth$0.330$1.09
Poland Central (Warsaw)/ polandcentral$0.330$1.09
Spain Central (Madrid)/ spaincentral$0.363$1.09
Sweden Central (Gävle)/ swedencentral$0.363$0.990
West Europe (Netherlands)/ westeurope$0.396$1.19
US
Central US (Iowa)/ centralus$0.330$0.990
East US (Virginia)/ eastus$0.330$0.990
East US 2 (Virginia)/ eastus2$0.330$0.990
North Central US (Illinois)/ northcentralus$0.330$0.990
South Central US (Texas)/ southcentralus$0.330$0.990
West Central US (Wyoming)/ westcentralus$0.330$0.990
West US (California)/ westus$0.330$0.990
West US 2 (Washington)/ westus2$0.330$0.990
West US 3 (Phoenix)/ westus3$0.330$0.990

Cost Calculator

Preset:
Compares every provider & tier in USD

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