Codestral

Code generation model Generally available Open Weights

Mistral AI's 22B code-specialized model trained on 80+ programming languages, supporting fill-in-the-middle code completion and a 32k context window.

Overview

Codestral (snapshot `codestral-2405`) is Mistral AI's first code-specialized language model introduced in May 2024. Built with 22 billion parameters, Codestral is optimized specifically for software development, code generation, bug fixing, and test writing across more than 80 programming languages. Codestral features a 32,768-token (32k) context window and supports fill-in-the-middle (FIM) code completion tasks natively. It exhibits high fluency in Python, Java, C++, C#, JavaScript, TypeScript, Swift, Go, and SQL. The model is accessible via Mistral's hosted API (`codestral-2405` at $0.20 / 1M input tokens, $0.60 / 1M output tokens) and dedicated IDE plugins. Open weights are downloadable under the Mistral Non-Commercial License for developer evaluation.

Technical Specifications

Context Window 32,768 tokens
Max Input Tokens 32,000
Max Output Tokens 8,192
Parameters 22.0B
Released 2025-01-17

Modalities

Text → Text (Both)

Capabilities

Text Generation Code Generation Function Calling

Use Cases

Coding Assistance Code Review

Languages

English (en)

Access Routes

Route Type Protocol Region / Scope Provider Status
Mistral AI Hosted API (Direct provider) Mistral REST API Global Mistral AI Available

Provider

Mistral AI

Identifiers

  • codestral-latest Canonical identifier Default
  • codestral-2405 Canonical identifier Default

Compare

See how this model stacks up against others.

Compare with Other Models

Platform Status

Optix AI is under active development. Verified model records, pricing schemas, deployment guides, and published benchmark data are being added progressively. Our mission is to provide transparent AI model discovery and comparison with clearly sourced facts.

Data Verification: Ongoing curation and manual verification of model specifications against official sources.
Regular Updates: Addition of newly released commercial and open-source models as records are verified.
Developer First: Built with transparency, clearly sourced facts, and community feedback.