Codestral API Pricing: Dedicated Code Intelligence & FIM Completion
Explore Mistral Codestral API pricing ($0.30/M input, $0.90/M output), Fill-in-the-Middle (FIM) code completion, 256K context, and developer ROI.
Full specs, context window and API limits →How much does Codestral cost per million tokens?
Codestral costs $0.30 per million input tokens and $0.90 per million output tokens ($0.45/M blended at 3:1). Specialized for coding with 256K context, native FIM support, and 80+ programming languages. Verified 2026-09-08.
How much does Codestral cost per 1,000 requests?
Computed from generated token pricing. Each row assumes the listed input and output tokens per request; output is adjusted by this model's measured 0.79× verbosity factor.
| Request shape | Input tokens | Output tokens | Cost / 1,000 requests |
|---|---|---|---|
| Short | 100 | 50 | $0.0656 |
| Medium | 1,000 | 500 | $0.6555 |
| Long | 4,000 | 2,000 | $2.6220 |
Formula: ((input price × input tokens) + (output price × output tokens × verbosity factor)) ÷ 1,000,000 × 1,000. Assumptions: short 100/50, medium 1,000/500, long 4,000/2,000 input/output tokens per request. Verbosity run: 2026-06-16T20:31:30.728Z.
Three model-specific pricing decisions
Codestral owns code-completion economics: general Mistral selection and coding-task recommendations remain elsewhere.
1. Autocomplete, fill-in-the-middle, and repository-edit bills
| Workload | Prompt / completion | 100K requests | Shape boundary |
|---|---|---|---|
| Autocomplete | 300 / 80 | $16.20 | Prompt and completion both text |
| Fill-in-middle | 1,500 / 300 | $72.00 | Code context is input tokens |
| Repository edit | 8,000 / 1,200 | $348.00 | Retry rate not assumed |
2. Cost-per-accepted-completion threshold versus Mistral Small
| Fixed input / output | Codestral | Mistral Small 3.1 | Narrow decision boundary |
|---|---|---|---|
| Autocomplete · 300 / 80 | $16.20 | $9.30 | 10% accepted-result uplift required |
| Repository edit · 8,000 / 1,200 | $348.00 | $192.00 | 20% accepted-result uplift required |
Formula: requests × (input tokens × input $/M + output tokens × output $/M) ÷ 1,000,000. The uplift is a planning threshold, not a measured quality claim.
Eligible coding-test coverage for this exact owner: Unavailable. Passing-run quality is not inferred from a neighboring model.
3. Developer wait-time frontier
| Shape | 100K bill | TTFT / throughput | Retry and mechanics |
|---|---|---|---|
| Autocomplete | $16.20 | 118 tokens/sec; TTFT 270 ms; 5 measured samples | Retry rate unavailable |
| Repository edit | $348.00 | 118 tokens/sec; TTFT 270 ms; 5 measured samples | Cache, batch, SLA unavailable |
Verified 2026-06-14. Luna is the data owner. “Unavailable” means no compatible dated evidence was found; it is never treated as zero. First-party price source · Run this Batch 5 scenario.
All three Batch 5 decisions are server-rendered for Codestral; fixed inputs, formulas, dated sources, speed sample state, and unavailable mechanics are visible.
Batch 68 · exact model pricing decision contributions · verified 2026-09-08
Exact model boundary: Mistral codestral (slug codestral). First-party provider pricing and API documentation remain fact owners.
Dedicated coding token pricing and monthly spend matrix
Frozen Batch 68 scenario board. Formula / deterministic rule: monthly_spend = devs * daily_completions * 22 * ((in * 0.30 + out * 0.90) / 1M) Boundary: Owns Codestral developer seat and IDE completion expenditure modeling.
| Frozen scenario / field ID | Model, identity, provider, and evidence fields | Result | State |
|---|---|---|---|
batch68-codestral-m1-r110-developer engineering team (5K completions/day) | model=codestral; slug=codestral; provider=Mistral; scenario=10-developer engineering team (5K completions/day); developer count; daily completions; monthly input tokens; monthly output tokens; total spend; cost per dev/mo; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — 10-developer engineering team (5K completions/day) is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m1-r250-developer product team (25K completions/day) | model=codestral; slug=codestral; provider=Mistral; scenario=50-developer product team (25K completions/day); developer count; daily completions; monthly input tokens; monthly output tokens; total spend; cost per dev/mo; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — 50-developer product team (25K completions/day) is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m1-r3250-developer enterprise organization | model=codestral; slug=codestral; provider=Mistral; scenario=250-developer enterprise organization; developer count; daily completions; monthly input tokens; monthly output tokens; total spend; cost per dev/mo; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — 250-developer enterprise organization is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m1-r4batch unit test generation run | model=codestral; slug=codestral; provider=Mistral; scenario=batch unit test generation run; developer count; daily completions; monthly input tokens; monthly output tokens; total spend; cost per dev/mo; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — batch unit test generation run is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m1-r5offline repository vulnerability scan | model=codestral; slug=codestral; provider=Mistral; scenario=offline repository vulnerability scan; developer count; daily completions; monthly input tokens; monthly output tokens; total spend; cost per dev/mo; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — offline repository vulnerability scan is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m1-r6unresolved billing currency | model=codestral; slug=codestral; provider=Mistral; scenario=unresolved billing currency; developer count; daily completions; monthly input tokens; monthly output tokens; total spend; cost per dev/mo; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — unresolved billing currency has no matched, dated bilateral observation. | FAIL CLOSED — manual, probe, or source evidence required |
First-party provenance: Mistral AI model pricing; verification date 2026-09-08. Missing or conflicting joins fail closed.
Fill-in-the-Middle (FIM) completion latency and accuracy gate
Frozen Batch 68 scenario board. Formula / deterministic rule: roi = developer_minutes_saved * hourly_rate - completion_cost Boundary: Owns FIM code synthesis quality and sub-200ms IDE inline completion.
| Frozen scenario / field ID | Model, identity, provider, and evidence fields | Result | State |
|---|---|---|---|
batch68-codestral-m2-r1single-line function autocomplete (<150ms) | model=codestral; slug=codestral; provider=Mistral; scenario=single-line function autocomplete (<150ms); completion type; token length; latency; developer acceptance rate; productivity ROI; tool verdict; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — single-line function autocomplete (<150ms) is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m2-r2multi-line algorithmic block completion | model=codestral; slug=codestral; provider=Mistral; scenario=multi-line algorithmic block completion; completion type; token length; latency; developer acceptance rate; productivity ROI; tool verdict; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — multi-line algorithmic block completion is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m2-r3docstring and type hint generation | model=codestral; slug=codestral; provider=Mistral; scenario=docstring and type hint generation; completion type; token length; latency; developer acceptance rate; productivity ROI; tool verdict; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — docstring and type hint generation is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m2-r4cross-file context code refactoring | model=codestral; slug=codestral; provider=Mistral; scenario=cross-file context code refactoring; completion type; token length; latency; developer acceptance rate; productivity ROI; tool verdict; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — cross-file context code refactoring is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m2-r5syntax error hallucination penalty | model=codestral; slug=codestral; provider=Mistral; scenario=syntax error hallucination penalty; completion type; token length; latency; developer acceptance rate; productivity ROI; tool verdict; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — syntax error hallucination penalty is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m2-r6unsupported programming language | model=codestral; slug=codestral; provider=Mistral; scenario=unsupported programming language; completion type; token length; latency; developer acceptance rate; productivity ROI; tool verdict; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — unsupported programming language has no matched, dated bilateral observation. | FAIL CLOSED — manual, probe, or source evidence required |
First-party provenance: Mistral AI documentation; verification date 2026-09-08. Missing or conflicting joins fail closed.
256K repository-level context analysis and caching break-even
Frozen Batch 68 scenario board. Formula / deterministic rule: cache_cost = (tokens * 0.15) / 1M + storage_fee; un-cached = (tokens * 0.30) / 1M Boundary: Owns multi-file repository indexing and prompt cache economics.
| Frozen scenario / field ID | Model, identity, provider, and evidence fields | Result | State |
|---|---|---|---|
batch68-codestral-m3-r1small library codebase (32K tokens) | model=codestral; slug=codestral; provider=Mistral; scenario=small library codebase (32K tokens); codebase size; base input cost; cached input cost; minimum reuse break-even; caching recommendation; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — small library codebase (32K tokens) is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m3-r2microservice repository (96K tokens) | model=codestral; slug=codestral; provider=Mistral; scenario=microservice repository (96K tokens); codebase size; base input cost; cached input cost; minimum reuse break-even; caching recommendation; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — microservice repository (96K tokens) is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m3-r3monorepo full context audit (256K tokens) | model=codestral; slug=codestral; provider=Mistral; scenario=monorepo full context audit (256K tokens); codebase size; base input cost; cached input cost; minimum reuse break-even; caching recommendation; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — monorepo full context audit (256K tokens) is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m3-r4multi-turn code review agent loop | model=codestral; slug=codestral; provider=Mistral; scenario=multi-turn code review agent loop; codebase size; base input cost; cached input cost; minimum reuse break-even; caching recommendation; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — multi-turn code review agent loop is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m3-r5cache eviction before 5-minute TTL | model=codestral; slug=codestral; provider=Mistral; scenario=cache eviction before 5-minute TTL; codebase size; base input cost; cached input cost; minimum reuse break-even; caching recommendation; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — cache eviction before 5-minute TTL is a frozen fixture pending exact identity, configuration, and denominator joins. | UNTESTED — assumption cannot establish a verdict |
batch68-codestral-m3-r6unresolved context window overflow | model=codestral; slug=codestral; provider=Mistral; scenario=unresolved context window overflow; codebase size; base input cost; cached input cost; minimum reuse break-even; caching recommendation; prompt/config/input/output/result/cache/checkpoint/artifact hashes=required; evidence=2026-09-08; measurement versus assumption=explicit | Unavailable — unresolved context window overflow has no matched, dated bilateral observation. | FAIL CLOSED — manual, probe, or source evidence required |
First-party provenance: Mistral AI model pricing; verification date 2026-09-08. Missing or conflicting joins fail closed.
Method and limitations: formulas are deterministic; observed and assumed inputs are labeled; no missing provider, host, account, region, realm, alias, snapshot, revision, weight, artifact, control, tool, modality, workload, rate-period, timestamp, or result is transferred. Run the codestral Batch 68 scenario →
How fast is Codestral?
How much does Codestral cost at scale?
| Tokens / month | Est. cost (blended 3:1) |
|---|---|
| 100,000 | $0.04 |
| 1,000,000 | $0.45 |
| 10,000,000 | $4.50 |
| 100,000,000 | $45.00 |
How does Codestral compare with other models?
What is Codestral best for?
What should you explore next for Codestral?
What are common questions about Codestral?
Is Codestral cheaper than GPT-OSS 120B (Cerebras)?
Codestral costs $0.45/M blended tokens, GPT-OSS 120B (Cerebras) costs $0.45/M — GPT-OSS 120B (Cerebras) is cheaper.
How much does 1 million tokens cost with Codestral?
At a 3:1 input:output ratio, 1 million blended tokens costs approximately $0.45. Pure input costs $0.30/M; pure output costs $0.90/M.
What does Codestral cost at high volume?
At 100 million blended tokens a month, Codestral costs approximately $45.00. See the cost-at-scale table below for other volumes.
