Codestral 25.08
Alias codestral-latest. Mistral's current code-completion model (Premier). OpenRouter lists 256K context; Mistral card says 128K.
- Context window
- 128,000 tokens
- Input
- text
- Output
- text
- License
- mistral-premier
- Pricing
- input: $0.3 · output: $0.9 (per 1M tokens (USD)) source
- Verified
- 2026-09-29
How to call it
| Provider | Model id | Endpoint / URL | Docs |
|---|---|---|---|
| Mistral API (FIM) | codestral-2508 | https://api.mistral.ai/v1/fim/completions | docs |
| Mistral API (chat) | codestral-latest | https://api.mistral.ai/v1/chat/completions | — |
| OpenRouter | mistralai/codestral-2508 | openrouter.ai/mistralai/codestral-2508 | — |
Notable capabilities (2)
- Low-latency fill-in-the-middle: Specialized for high-frequency FIM/autocomplete with a dedicated FIM endpoint, plus predicted outputs. source
- Predicted outputs and prefix mode: Supports predicted outputs (fast edits of known code) and assistant prefix, plus function calling and structured outputs. source
IDE autocomplete / FIM and fast code generation.
curl https://api.mistral.ai/v1/fim/completions -H "Authorization: Bearer $MISTRAL_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"codestral-2508","prompt":"def fib(n):","suffix":"\nprint(fib(10))"}'
Sources: https://docs.mistral.ai/models/model-cards/codestral-25-08
Other Mistral AI models
Mistral OCR 4.1 · Mistral Medium 3.5 · Voxtral TTS · Mistral Small 4 · Voxtral Transcribe 2 (Mini Transcribe V2 + Voxtral Realtime) · Mistral Large 3 · Voxtral Small · Robostral Navigate