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