Codestral Models by MistralAI
About
Codestral is Mistral AI's family of large language models crafted for code generation tasks. The flagship model, Codestral-22B-v0.1, is equipped with 22 billion parameters and has been trained on a diverse dataset encompassing over 80 programming languages, from widely used ones like Python, Java, C++, JavaScript, and Bash to more niche languages such as Swift and Fortran 13. This versatility supports developers in various coding environments, enhancing tasks such as code completion, generation, and testing by using instruction-following and fill-in-the-middle (FIM) techniques. Available under Mistral AI's Non-Production License for research and testing, Codestral also offers commercial licensing options. Additionally, the Codestral Mamba variant employs a state space model (SSM) for linear time inference, accommodating longer coding sequences efficiently 13.
Current Variants
Use-when guidance is derived from seed capabilities, context, release, and replacement fields.
Use when the workload needs 262k context and 22B parameters.
Use when the workload needs 256k context and 7B parameters.
| Model | Use when | Released | Signals | Status |
|---|---|---|---|---|
| Mistral Codestral 2508 | Use when the workload needs 256k context. | 2025-08 | 256k context | Current |
| Codestral 2501 | Use when the workload needs 262k context and 22B parameters. | 2025-01 | 262k context22B parameters | Current |
| Codestral Mamba 7B | Use when the workload needs 256k context and 7B parameters. | 2024-07 | 256k context7B parameters | Current |
Release Timeline
4 release groupsSpecifications(4 models)
| Model | Released | Context | Parameters |
|---|---|---|---|
| Mistral Codestral 2508 | 2025-08 | 256k | 24B MoE |
| Codestral 2501 | 2025-01 | 262k | 22B |
| Codestral Mamba 7B | 2024-07 | 256k | 7B |
Available From(4 providers)
Pricing
| Model | Provider | Input / 1M | Output / 1M | Type |
|---|---|---|---|---|
| Codestral 2501 | Microsoft Foundry | $0.3 | $0.9 | Serverless |
| Mistral Codestral 2508 | Vercel AI Gateway | $0.3 | $0.9 | Serverless |
Frequently Asked Questions
- What is Codestral used for?
- Codestral is used for coding. The family description and listed model capabilities point to those workloads as the best fit.
- How does Codestral compare to Ministral?
- Codestral by MistralAI is strongest where you need coding, while Ministral by MistralAI is the closest related family to check for structured outputs. Codestral has 4 listed variants and reaches up to 262k context, while Ministral reaches up to 32k context, so compare the specs and pricing tables before choosing a production model.
- Which Codestral model should I use?
- For the lowest listed input price, start with Codestral 22B through Mistral AI Studio at $0.3/1M input tokens. For the most capable/latest local choice, evaluate Codestral 2501 with 262k context.






