Codestral vs GPT-4o Mini: Detailed Comparison
Choosing between Codestral (Mistral AI) and
GPT-4o Mini (OpenAI) comes down to three things:
per-token pricing, context window, and which capability matters most for your workload.
Codestral costs $0.20/M input vs
$0.15/M for GPT-4o Mini;
context windows are 32K vs
128K tokens. Detailed breakdown below.
Side-by-side specs
| Spec | Codestral | GPT-4o Mini |
| Provider | Mistral AI | OpenAI |
| Released | 2024-05-29 | 2024-07-18 |
| Input price |
$0.20/M |
$0.15/M |
| Output price |
$0.60/M |
$0.60/M |
| Cached input |
— |
$0.0750/M |
| Context window |
32K |
128K |
| Max output |
4K |
16K |
| Modalities |
text |
text image |
| Tokenizer |
mistral |
o200k_base |
Capability matrix
| Capability | Codestral | GPT-4o Mini |
| function calling |
Yes |
Yes |
| json mode |
Yes |
Yes |
| streaming |
Yes |
Yes |
| code |
Yes |
No |
| vision |
No |
Yes |
Per-call cost on typical workloads
| Workload (in/out tokens) | Codestral | GPT-4o Mini | Cheaper by |
| Standard chat (1K / 500) |
$0.000500 |
$0.000450 |
GPT-4o Mini by $0.000050 |
| RAG (4K / 500) |
$0.001100 |
$0.000900 |
GPT-4o Mini by $0.000200 |
| Long doc (20K / 1K) |
$0.004600 |
$0.003600 |
GPT-4o Mini by $0.001000 |
| Very long context (100K / 2K) |
$0.020900 |
$0.015900 |
GPT-4o Mini by $0.005000 |
When to choose Codestral over GPT-4o Mini
- Supports code — GPT-4o Mini does not.
When to choose GPT-4o Mini over Codestral
- Per-token input cost is 25% lower than Codestral.
- Larger context window (128K vs 32K).
- Supports vision — Codestral does not.
Related comparisons