Mistral: CodestralOfficial docs

Mistral: Codestral

byMistral
Official docs

Codestral is a language model from Mistral released on May 29, 2024. It reads text and writes text, with a 128K token context window and up to 4K tokens per reply.

Show more

It costs $0.30 per million input tokens and $0.90 per million output tokens. Cached input bills at $0.03, 90% less than fresh input.

It supports tool calling, structured JSON output and prompt caching, and its weights are open, so you can host it yourself.

6 providers serve it, including Vercel AI Gateway, Concentrate and Eden AI.

Modalities
In / out price
$0.30 / $0.90 per 1M
Context
128K
Max output
4K
Released
May 29, 2024
Knowledge cutoff
Oct 2024
  • Tool calling
  • Structured output
  • Reasoning
  • Prompt caching
  • Open weights
  • Free to use

Codestral pricing

USD, as listed on Nov 29, 2026. Most bills are input heavy, so the cached input rate matters as much as the headline price.

Input$0.30 / 1M tokens
Output$0.90 / 1M tokens
Cached input (read)$0.03 / 1M tokens

Codestral providers

6 providers serve it, including Vercel AI Gateway, Concentrate and Eden AI. Each host sets its own price and limits, so the cheapest one is not always the one with the longest context.

ProviderInput /MOutput /MCache read /MContextMax output
Mistral First party$0.30$0.90$0.03256K4K
Vercel AI Gateway$0.30$0.90$0.03128K4K
Concentrate$0.30$0.90$0.03128K8K
Eden AI$0.30$0.90$0.03256K4K
Kilo Gateway$0.30$0.90$0.03128K4K
Merge Gateway$0.30$0.90n/a256K4K

What Codestral costs per month

Pick a workload close to yours or type your own volumes.

Codestral per month
$19.80
Without caching
$31.95
Per request
$0.0007

Supported request parameters

What you can set when you call Codestral through an OpenAI compatible API.

  • Toolstools
  • Structured outputsstructured_outputs
  • Temperaturetemperature

Alternatives to Codestral

Models that take the same inputs and call tools, closest in price, cheaper ones first.

  • Reads text, images and files. Tool calling, structured output, reasoning. Served by 53 providers.

    by openaiJul 9, 2026$0.20/M input tokens$1.20/M output tokens53 providers

  • Reads text and files. Tool calling, structured output. Served by 10 providers.

    by mistralaiJul 30, 2025$0.30/M input tokens$0.90/M output tokens10 providers

  • Reads text and images. Tool calling, structured output, reasoning. Served by 3 providers.

    by inclusionaiNov 5, 2026$0.30/M input tokens$0.90/M output tokens3 providers

  • Reads text. Tool calling, reasoning. Served by 2 providers.

    by inclusionaiOct 30, 2026$0.30/M input tokens$0.90/M output tokens2 providers

  • Reads text. Tool calling, structured output, reasoning. Served by 10 providers.

    by inclusionaiSep 29, 2026$0.30/M input tokens$0.90/M output tokens10 providers

  • Reads text, images and files. Tool calling, structured output, reasoning. Served by 5 providers.

    by openaiJul 9, 2026$0.20/M input tokens$1.20/M output tokens5 providers

More from Mistral

All Mistral models

Codestral questions

How much does the Codestral API cost?

$0.30 per million input tokens and $0.90 per million output tokens, with cached input at $0.03. The estimator on this page turns that into a monthly bill for your own workload.

What is the context window of Codestral?

128,000 tokens of input, and it can write up to 4,000 tokens in one reply. As a rough guide, a million tokens is around 750,000 English words.

Which providers serve Codestral?

6 providers serve it, including Vercel AI Gateway, Concentrate and Eden AI. Prices differ by host, so the Providers table on this page lists each one with its input and output price.

Does Codestral support tool calling?

Yes. It accepts tool definitions and can return JSON that matches a schema, which is what an agent needs to call your APIs.

Is Codestral open source?

Its weights are published, so you can run it on your own hardware or a cloud of your choice. Read the license before commercial use.

When was Codestral released?

May 29, 2024, with training data up to Oct 2024.

Catalog data from models.dev (MIT licensed), refreshed daily, last on Nov 29, 2026. The summary is written from these facts.