{T}
TokenMath.net
Verified against Mistral AI Official Inference Pricing
Mistral AIflagshipGenerally AvailableActive Production

Codestral (Current Generation) API Pricing & Cost Calculator

Specialized generative coding and fill-in-the-middle model fluent in 80+ programming languages Need a token count first? Use the Mistral token counter.

Legacy Identifier Aliasing: Requests using deprecated endpoints (codestral-2501) automatically route to codestral-latest and are billed at current Codestral (Current Generation) rates.
Standard Input / 1M
$0.30
Prompt tokens
Cached Input / 1M
$0.03
Prompt caching rate
Output / 1M
$0.90
Generation completion
Context Window
256k
Max out: 8.2k
API & Developer Integration Details
generally available
API Model Stringcodestral-latest
Provider & FamilyMistral AI (mistral_tekken)
Prompt Caching RulesSupported
Long-Context TiersStandard flat rate throughout full window
First-party audit timestamp: 2026-10-11 07:55 UTCOfficial Documentation

Interactive Cost & Token Simulator for Codestral (Current Generation)

Live Calculation
Input Tokens2,500
Output Tokens800
Requests / Day5,000
Prompt Caching Ratio (50%)$0.03/M cached rate
Cost / Request$0.00113
Daily Spend (5,000 reqs)$5.6625
Monthly Run-Rate (30d)$169.88

Standard Workload Cost Scenarios

ScenarioInput TokensOutput TokensUncached CostWith Prompt Caching
Short Chat Query1,000500$0.00075$0.00048
Document Summarization10,0002,000$0.00480$0.00210
Codebase & Context Analysis100,00020,000$0.0480$0.0210
Batch Corpus Processing1,000,000100,000$0.3900$0.1200
Technical Architecture & Pricing VerificationVerified: 2026-10-11 07:55 UTC
Model ArchitectureCodestral (Current Generation)
Provider OrganizationMistral AI
Tokenizer EncodingMistral Tekken BPE (~131k vocabulary)
API ConnectivityMistral FIM completion API (/v1/fim/completions) with native tool use.
Batch API 50% DiscountNot Available
Tier 1 Rate Quota (Free-Tier Reference)300 RPM · 1M TPM

Tier 1 (free tier) reference limits — your account's actual quota may be higher.

Blended 3:1 Cost / 1M Tokens$0.45
Active production Codestral model (codestral-latest) with 90% prompt caching discount ($0.03/1M). Codestral 2501 was officially retired on November 30, 2025 (previously $0.20/$0.60).Mistral AI Official Inference Pricing

Verified Pricing History

September 16, 2026: $0.3/M input · $0.9/M output ($0.03/M cached)
Calibrated to active Codestral (codestral-latest) official pricing ($0.30 in / $0.03 cached / $0.90 out). Documented retirement of Codestral 2501 (Nov 30, 2025).
September 2026: $0.2/M input · $0.6/M output ($0.06/M cached)
Verified Codestral 2501 official API rates.

When to Choose Codestral (Current Generation)

Ideal for production workloads demanding flagship capabilities, deep context depth (256k tokens), and reliability from Mistral AI. Excellent when predictable tokenomics and prompt caching support are paramount.

When Another Model May Be Better

If your use-case requires sub-second streaming latency or ultra-high frequency classification at micro-cent pricing, consider lighter budget options such as Gemini Flash-Lite or Claude Haiku. For deep formal logic, consider dedicated reasoning models like o3.

Frequently Asked Questions About Codestral (Current Generation)

How much does 1 million tokens cost with Codestral (Current Generation)?

For Codestral (Current Generation), 1 million input tokens costs $0.30, while 1 million output tokens costs $0.90. If using prompt caching, repetitive input prefixes are discounted to $0.03 per million.

What is the context window for Codestral (Current Generation)?

Codestral (Current Generation) features a maximum context window of 256,000 tokens (~192,000 words), with a maximum output limit of 8,192 tokens per completion.

Which tokenizer does Codestral (Current Generation) use?

Codestral (Current Generation) utilizes the Mistral Tekken BPE (~131k vocabulary). Token counting on TokenMath runs client-side to ensure maximum privacy.

Does Codestral (Current Generation) support prompt caching discounts?

Yes. Codestral (Current Generation) supports prompt caching with a cached input rate of $0.03/1M (saving up to 90% on repeated input context).