LLM Reference

Codestral Models by MistralAI

MistralAICoding
4 models2024–2025Up to 262k ctxFrom $0.3/1M input

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.

3 in view1 retired

Use when the workload needs 256k context.

2025-08256k context

Use when the workload needs 262k context and 22B parameters.

2025-01262k context22B parameters

Use when the workload needs 256k context and 7B parameters.

2024-07256k context7B parameters

Release Timeline

4 release groups
2025-08
1 current
Current
2025-01
1 current
Codestral 2501
262k context22B parameters
Current
2024-07
1 current
Codestral Mamba 7B
256k context7B parameters
Current
2024-05
1 retired
Codestral 22B
32k context22B parameters
Archived

Specifications(4 models)

Codestral model specifications comparison
ModelReleasedContextParameters
Mistral Codestral 25082025-08256k24B MoE
Codestral 25012025-01262k22B
Codestral Mamba 7B2024-07256k7B

Available From(4 providers)

Pricing

Codestral model pricing by provider
ModelProviderInput / 1MOutput / 1MType
Codestral 2501Microsoft Foundry$0.3$0.9Serverless
Mistral Codestral 2508Vercel AI Gateway$0.3$0.9Serverless

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.

Models(4)