Codestral
Available standardPurpose-built for code generation and software engineering
Released May 29, 2024
- Context Window
- 32K
- TTFT
- N/A
- Speed
- N/A
- Max Output
- 8K
- Training Cutoff
- 2024-04
Last tested: 2026-01-15
About
Codestral is Mistral's dedicated code model, trained specifically for software development tasks. With a 32K context window optimized for file-level understanding, it excels at code completion, generation, refactoring, and documentation across 80+ programming languages. The go-to choice for IDE integrations and developer tools.
Capabilities
Pricing
- Input
- $0.20/M per 1M tokens
- Output
- $0.60/M per 1M tokens
Static pricing
Details
Codestral
Codestral is Mistral’s answer to the specialized code model category. Rather than retrofitting a general-purpose model for code, Mistral trained Codestral from the ground up on software engineering data, resulting in a model that truly understands how developers work.
Optimized for Development
80+ Languages: From mainstream languages like Python, JavaScript, TypeScript, Java, C++, and Go to specialized languages like Rust, Kotlin, Swift, and even legacy languages like COBOL and Fortran.
Fill-in-the-Middle: Native support for code infilling, essential for IDE integration. Codestral can complete code given surrounding context, not just generate from a prefix.
Ultra-Low Latency: At 35ms average response time and 200 tokens per second, Codestral feels instantaneous in real-time coding environments.
IDE Integrations
Codestral powers coding assistants across the ecosystem:
- VS Code: Via Continue, Cody, and other extensions
- JetBrains: Native plugin support
- Vim/Neovim: Through LSP integrations
- Jupyter: Interactive notebook assistance
Developer Workflows
Code Generation: Describe what you need in natural language, get working code.
"Write a Python function that validates email addresses using regex"
Refactoring: Improve existing code structure and performance.
"Refactor this function to use async/await instead of callbacks"
Documentation: Generate docstrings, comments, and README content.
"Add comprehensive docstrings to this class following Google style"
Test Generation: Create unit tests from implementation code.
"Generate pytest tests for this authentication module"
Pricing for Scale
At $0.20/M input tokens, Codestral is economical enough for high-frequency use cases like real-time code completion. A typical developer session generates thousands of requests; Codestral keeps costs manageable.
European Engineering
Built in Paris by Mistral’s team of former DeepMind and Meta researchers, Codestral represents European excellence in AI for developers. It offers a compelling alternative to American code models with transparent pricing and data handling.
Provider
Other Mistral AI Models
See all models- Mistral Large 2
- Mistral's flagship model for enterprise reasoning
- Context
- 128K
- Speed
- N/A
- TTFT
- N/A
- Mixtral 8x22B
- Sparse mixture-of-experts model with frontier performance
- Context
- 64K
- Speed
- N/A
- TTFT
- N/A
- Mistral Small
- Cost-efficient model for high-volume applications
- Context
- 128K
- Speed
- N/A
- TTFT
- N/A
Get the signal, skip the noise.
Weekly digest of new models and provider updates across 40+ compute providers. Curated for AI builders who ship.