Mistral AI
Codestral
Mistral's code model with fill-in-the-middle for editor autocomplete. Sample entry.
USD per 1M output tokens
$0.90
- input
- $0.30
- output
- $0.90
#1 cheapest of 5 in Code generation & completion
Official pricing ↗Capabilities, explained
What this API can do, and what each capability means for your project.
Input price
$0.3
Cost of the code and context you send. Large for coding agents because the repo is re-sent often.
Context window
256K tokens
How much code the model can read at once. 256K tokens fits roughly a mid-sized codebase module set.
Fill-in-the-middle
Yes
Supports completing code between a prefix and suffix, required for editor autocomplete.
Tool use / agent mode
Yes
Can call tools (shell, editor, search) so it can act as a coding agent, not just write snippets.
Faster tier available
—
The provider sells a higher-speed version of the model, usually at a premium price.
Open weights
No
The model weights are downloadable, so you can self-host it or switch hosting providers without changing models.
Price history
Only one price recorded so far. The chart appears once the price changes.