What GPT-5.2 Codex and Mistral Codestral cost for coding
By TechCompare · Updated · How we check
Mistral Codestral is more economical, offering cheaper base input and output rates. Use GPT-5.2 Codex if your code pipeline is deeply integrated into OpenAI's ecosystem.
OpenAI: GPT-5.2-Codex
Cheapest host: Azure
- Input
- $1.75
- Output
- $14
- Cached
- $0.175
per 1M tokens
Price checked 2026-12-02
A newer version is out: GPT-5.3-Codex
Mistral: Codestral 2508
Mistral's own price
- Input
- $0.30
- Output
- $0.90
- Cached
- $0.03
per 1M tokens
Price checked 2026-12-02
Cost Comparison
Based on 100,000 input tokens (50% cached), 5,000 output tokens, and 100 requests.Prices come live from OpenRouter at each maker's own price where it's listed. Temporary deals are left out.
Dedicated coding endpoints offer tuned performance for auto-complete and refactoring. GPT-5.2 Codex and Mistral Codestral are two specialized developer APIs.
Developer-focused auto-complete and refactoring endpoints.
Side-by-side specs
| Spec | GPT-5.2 Codex | Mistral Codestral |
|---|---|---|
| Input Cost (per M) | $1.75 | $0.30 (better on this spec) |
| Output Cost (per M) | $14.00 | $0.90 (better on this spec) |
| Cached Input (per M)Cached input is text the provider has already processed. It costs less than fresh input. | $0.175 | $0.03 (better on this spec) |
| Batch input / output (per M) | None | $0.15 / $0.45 |
How they differ
GPT-5.2 Codex costs $1.75 per million input tokens and $14.00 per million output tokens, with a 90% caching discount. Mistral Codestral is priced at $0.30 per million input tokens and $0.90 per million output tokens, also with a 90% caching discount.
Verdict
Run the integration-cost math before paying Codex's premium for OpenAI-stack lock-in. Codestral wins every row: $0.30/M input against $1.75, $0.90/M output against $14.00 (about 15.6x), and $0.03/M cached input against $0.175. Codestral also has batch prices where Codex offers none, dropping batch output to $0.45/M versus Codex's live $14.00/M. The shared 90% input cache discount preserves the relative input ratio, while the absolute input gap shrinks from $1.45/M to $0.145/M.
Which should you pick?
Choose GPT-5.2 Codex
OpenAI-standard completions pipelines and legacy auto-complete structures.
Choose Mistral Codestral
Economical multi-lingual code completion, inline refactoring, and general script generation.