Skip to content
PALM SOUQ

Mistral · Codestral · Mid

Codestral pricing and limits

Mistral's coding model with a 256K context window, built for code completion and fill-in-the-middle as well as chat. Low output price suits high-frequency IDE traffic.

List prices last fully reviewed June 2026. Standard tier, shortest context band.
ledger · completion requestcodestral
X-PalmSouq-Tenant acme-legal
X-PalmSouq-Feature completion-request
LineTokensRate / 1MCost
Input, uncached4,000$0.30$0.00120
Output150$0.90$0.00014
Request total$0.00134
x 3,000,000 calls / month$4,005
Input / 1M
$0.30
Output / 1M
$0.90
Cached / 1M
n/a
Cache write / 1M
n/a
Blended 3:1
$0.45
Context
256K

What drives Codestral cost

Code completion fires on keystrokes, so request count is huge and prompts carry surrounding file context. Debouncing in the editor and trimming context to the relevant window matter more than the per-token rate.

No cache-read discount in the list price, so repeated file context is billed in full each time.

Cost of a typical call

Take a completion request with 4,000 input tokens and 150 output tokens. At Codestral list prices ($0.30 input, $0.90 output per 1M) one call costs $0.00134, and 3,000,000 calls a month come to $4,005. The list price has no discounted cache-read rate, so every input token is billed at the full rate on every call.

Blended at a 3:1 input to output ratio, Codestral costs $0.45 per 1M tokens. Routing the same call to the fallback in the policy below, Mistral Small 3.1, costs $0.00044, which is what a tenant pays you in COGS once they cross the hard cap and PALM SOUQ downgrades instead of blocking.

Cost comparison

Codestral against three alternatives

The same completion request priced on GPT-5 mini, Claude Haiku 4.5, DeepSeek V3.2 (chat). Move the sliders to match your traffic; models without a cache-read rate bill every input token in full.

Benchmark quality per task before switching. A cheaper model that needs more steps or longer outputs can cost more per finished task than its rate suggests, which is why PALM SOUQ reports cost per feature, not only per token.

cost-comparecompletion request, 150 output tokens
  • Codestral this guide

    $0.00134 per call

    $3,338 / mo

    baseline

  • GPT-5 mini

    $0.00130 per call

    $3,250 / mo

    -3% vs Codestral

  • Claude Haiku 4.5

    $0.00475 per call

    $11,875 / mo

    +256% vs Codestral

  • DeepSeek V3.2 (chat)

    $0.00118 per call

    $2,958 / mo

    -11% vs Codestral

List prices from the PALM SOUQ LLM Price Index, computed per call as uncached input + cache reads + output. Reasoning tokens count as output on reasoning models.

Rate limits by usage tier

Workspace level limits by tier on la Plateforme. IDE integrations generate bursty traffic, so per-user rate limits are as important as workspace limits.

Exact limits vary by account tier and change over time, so we do not reprint them here. Check the limits page for your own account in the Mistral documentation at docs.mistral.ai. PALM SOUQ enforces your own per-tenant limits in front of the provider's, so a single customer cannot consume the shared allowance that every other tenant depends on.

Circuit-breaker best practices

Rate limit per end user with the X-PalmSouq-User header, not only per tenant. One developer with a misbehaving plugin can otherwise exhaust a company's shared budget.

For code agents built on Codestral, watch for git merge-conflict loops where the agent rewrites the same hunk repeatedly; the tool thrashing check catches the repeated file writes.

When a breaker trips, the gateway answers in under 50 ms with HTTP 429 and X-PalmSouq-Reason: circuit_breaker_triggered, before the request reaches Mistral. Your agent framework sees a normal rate-limit response and stops, and the audit log records which heuristic fired and for which tenant.

palmsouq.policy.yaml
# palmsouq.policy.yaml
policy: codestral-pro
match:
  model: codestral
  tier: pro            # from X-PalmSouq-Tier
budgets:
  monthly_usd: 80       # per tenant
  soft_cap_pct: 80          # webhook to your app
  on_hard_cap: fallback     # or: block (HTTP 429)
fallback:
  - mistral-small-3.1
breakers:
  tool_thrashing: { identical_calls: 3, window_steps: 8 }
  token_velocity: { max_tokens_per_s: 50000, window_s: 10 }
  semantic_echo: { repeats: 3 }
  max_steps: 10
  • budgetsPer-tenant monthly dollar cap with an 80% soft-cap webhook, keyed by X-PalmSouq-Tenant.
  • fallbackAt the hard cap, requests reroute to Mistral Small 3.1 ($0.15 blended per 1M) instead of failing.
  • breakersAll four loop heuristics on, evaluated in the request path with under 5 ms added latency.

Where it fits

IDE completion, code chat and code agents where a specialised coding model at a low rate beats a general frontier model on cost.

Provider documentation: docs.mistral.ai

Related cost guides

Codestral pricing questions

How much does Codestral cost per million tokens?

At list price Codestral costs $0.30 per 1M input tokens and $0.90 per 1M output tokens. Prices were last reviewed in the PALM SOUQ LLM Price Index and are for the standard tier and shortest context band.

Does Codestral support prompt caching?

The Mistral list price for Codestral has no discounted cache-read rate, so PALM SOUQ meters every input token at $0.30 per 1M. Shortening repeated context and caching full responses in your own application are the main savings levers.

What are the Codestral rate limits?

Workspace level limits by tier on la Plateforme. IDE integrations generate bursty traffic, so per-user rate limits are as important as workspace limits. For your account's exact numbers, see the Mistral documentation at docs.mistral.ai.

How do I stop runaway Codestral agent loops?

Rate limit per end user with the X-PalmSouq-User header, not only per tenant. One developer with a misbehaving plugin can otherwise exhaust a company's shared budget. The sample policy on this page enables all four PALM SOUQ heuristics with a max step cap of 10 and falls back to Mistral Small 3.1 at the hard cap.

Is there a batch discount for Codestral?

50% off through the Mistral batch API. Batch traffic suits evaluations, backfills and nightly enrichment jobs that do not need a real-time answer.

Govern Codestral spend per customer.

Point your Mistral client at gateway.palmsouqltd.com, pass X-PalmSouq-Tenant, and every Codestral token is attributed, capped and protected by circuit breakers.

14-day free production trial · 100k requests included · no card required