Codestral vs GPT-5 Mini: Detailed Comparison

Choosing between Codestral (Mistral AI) and GPT-5 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.25/M for GPT-5 Mini; context windows are 32K vs 400K tokens. Detailed breakdown below.

Side-by-side specs

SpecCodestralGPT-5 Mini
ProviderMistral AIOpenAI
Released2024-05-292025-08-07
Input price $0.20/M $0.25/M
Output price $0.60/M $2.00/M
Cached input $0.0250/M
Context window 32K 400K
Max output 4K 128K
Modalities text text image
Tokenizer mistral o200k_base

Capability matrix

CapabilityCodestralGPT-5 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)CodestralGPT-5 MiniCheaper by
Standard chat (1K / 500) $0.000500 $0.001250 Codestral by $0.000750
RAG (4K / 500) $0.001100 $0.002000 Codestral by $0.000900
Long doc (20K / 1K) $0.004600 $0.007000 Codestral by $0.002400
Very long context (100K / 2K) $0.020900 $0.028000 Codestral by $0.007100

When to choose Codestral over GPT-5 Mini

  • Per-token input cost is 20% lower — meaningful for high-volume workloads.
  • Supports code — GPT-5 Mini does not.

When to choose GPT-5 Mini over Codestral

  • Larger context window (400K vs 32K).
  • Supports vision — Codestral does not.

Related comparisons