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