Skip to main content
Mistral AIReleased May 29, 2024

Codestral

22B parameters

Codestral is Mistral AI's entry in a crowded field. Context window: 0.032K tokens.

Context

32K

Input

$0.30

Key Specifications

🏆

Arena Rank

Not disclosed

📐

Context Window

32K

📥

Input Price

per 1M tokens

$0.30

📤

Output Price

per 1M tokens

$0.90

🧠

Parameters

22B

🔒

Open Source

No

Best For

Code generationcode completiondebugging

About Codestral

Codestral, developed by Mistral AI, is a specialized code model with 22 billion parameters and a 32K token context window trained on over 80 programming languages. The model is optimized specifically for software development tasks including code completion, generation, refactoring, documentation, and test writing. Unlike general-purpose models, Codestral's focused training delivers stronger performance on code-specific tasks, particularly fill-in-the-middle completion for IDE integration. It features low-latency inference suitable for real-time autocomplete in development environments. Priced at $0.30 per million input tokens and $0.90 per million output tokens. Codestral powers coding assistants and integrates with popular development tools including VS Code and JetBrains IDEs. Its specialized architecture achieves competitive scores on HumanEval and MBPP benchmarks, rivaling much larger general-purpose models on coding tasks.

Pricing per 1M tokens

Input Tokens

$0.30

Output Tokens

$0.90

Frequently Asked Questions

What is Codestral?
Codestral, developed by Mistral AI, is a specialized code model with 22 billion parameters and a 32K token context window trained on over 80 programming languages. The model is optimized specifically for software development tasks including code completion, generation, refactoring, documentation, and test writing. Unlike general-purpose models, Codestral's focused training delivers stronger performance on code-specific tasks, particularly fill-in-the-middle completion for IDE integration. It features low-latency inference suitable for real-time autocomplete in development environments. Priced at $0.30 per million input tokens and $0.90 per million output tokens. Codestral powers coding assistants and integrates with popular development tools including VS Code and JetBrains IDEs. Its specialized architecture achieves competitive scores on HumanEval and MBPP benchmarks, rivaling much larger general-purpose models on coding tasks.
How much does Codestral cost?
Codestral costs $0.30 per 1M input tokens and $0.90 per 1M output tokens. You pay only for what you use, which keeps costs predictable.
What is Codestral's context window?
Codestral has a context window of 32K tokens. This determines how much text the model can process in a single request — bigger windows mean longer documents and richer conversation history.
Is Codestral open source?
No, Codestral is a proprietary model available through Mistral AI's API. You get managed infrastructure, regular updates, and support as part of the package.
What is Codestral best for?
Codestral is best suited for: Code generation, code completion, debugging. These use cases play to the model's strengths in capability, speed, and cost within Mistral AI's lineup.