← All models
M

Codestral

Mistral

Code-specialized model with 256k context — optimized for fill-in-the-middle

Input price$0.30 / 1M tokens
Output price$0.90 / 1M tokens
Context window256k tokens
Last updated2026-04-20

Quick calculator

tokens
tokens
req/day
Per request
$0.000750
Daily
$7.50
Monthly
$225.00
per month · 30-day estimate
Yearly
$2,737.50

Tips to reduce cost

  • Use prompt caching to reuse repeated system prompts
  • Trim whitespace and reduce verbose instructions
  • Use a smaller model for classification or routing tasks
  • Batch async requests to get 50% discount (OpenAI/Anthropic)
  • Cache identical requests at the application layer

Similar models from Mistral

Compared at your current token settings

About Codestral

Codestral is a mid-range large language model from mistral, priced at $0.3/1M input tokens and $0.9/1M output tokens. It is 88% cheaper than the market average and best suited for code generation. The 256k context window handles long documents, extended conversations, and large code files comfortably.

For most production workloads, the cost breakdown is dominated by input tokens (system prompts, context, retrieved documents) rather than output. At this price point, Codestral is a solid choice when balancing quality and cost at scale.

Frequently Asked Questions

How much does Codestral cost per 1,000 tokens?
Codestral costs $0.0003 per 1,000 input tokens and $0.0009 per 1,000 output tokens.
What is Codestral's context window?
Codestral supports a context window of 256k tokens, which is suitable for long documents and multi-turn conversations.
How does Codestral compare to GPT-4o on price?
Codestral is 88% cheaper than the market average on input tokens. At $0.3/1M input vs $2.50/1M for GPT-4o, the cost difference becomes significant at scale — 10,000 requests/day with 1,000 input tokens each costs $90/month with Codestral vs $750/month with GPT-4o.

Compare Codestral with other models

Codestral vs Gemini 2.5 FlashCodestral vs Grok 3 MiniCodestral vs DeepSeek ChatCodestral vs Llama 3.3 70BCodestral vs GPT-4.1 MiniCodestral vs o3