Codestral vs GPT-5: Detailed Comparison
Choosing between Codestral (Mistral AI) and
GPT-5 (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
$1.25/M for GPT-5;
context windows are 32K vs
400K tokens. Detailed breakdown below.
Side-by-side specs
| Spec | Codestral | GPT-5 |
| Provider | Mistral AI | OpenAI |
| Released | 2024-05-29 | 2025-08-07 |
| Input price |
$0.20/M |
$1.25/M |
| Output price |
$0.60/M |
$10.00/M |
| Cached input |
— |
$0.1300/M |
| Context window |
32K |
400K |
| Max output |
4K |
128K |
| Modalities |
text |
text image |
| Tokenizer |
mistral |
o200k_base |
Capability matrix
| Capability | Codestral | GPT-5 |
| function calling |
Yes |
Yes |
| json mode |
Yes |
Yes |
| streaming |
Yes |
Yes |
| code |
Yes |
No |
| vision |
No |
Yes |
| reasoning |
No |
Yes |
Benchmark comparison
Higher is better for all benchmarks shown.
Per-call cost on typical workloads
| Workload (in/out tokens) | Codestral | GPT-5 | Cheaper by |
| Standard chat (1K / 500) |
$0.000500 |
$0.006250 |
Codestral by $0.005750 |
| RAG (4K / 500) |
$0.001100 |
$0.010000 |
Codestral by $0.008900 |
| Long doc (20K / 1K) |
$0.004600 |
$0.035000 |
Codestral by $0.030400 |
| Very long context (100K / 2K) |
$0.020900 |
$0.140000 |
Codestral by $0.119100 |
When to choose Codestral over GPT-5
- Per-token input cost is 84% lower — meaningful for high-volume workloads.
- Supports code — GPT-5 does not.
When to choose GPT-5 over Codestral
- Larger context window (400K vs 32K).
- Supports vision — Codestral does not.
- Supports reasoning — Codestral does not.
Related comparisons