Codestral by Mistral

Dedicated code model with a free “Codestral” API key - fill-in-the-middle + chat.

Access
Free API tier
Free limits
30 RPM free tier
Modality
code, text
Credit card
Not required
Commercial use
Not on the free tier
Rate limit
30 RPM
Performance tier
Strong · ⚡ Fast
Model ID
codestral-latest
Base URL
https://api.mistral.ai/v1
Last verified
June 2026

Quickstart

curl https://api.mistral.ai/v1/chat/completions \
  -H "Authorization: Bearer $KEY" \
  -d '{"model":"codestral-latest","messages":[{"role":"user","content":"write fizzbuzz"}]}'

Frequently asked

Is Codestral free?

Yes. Mistral offers it as Free API tier with these limits: 30 RPM free tier. No credit card is required.

Can I use Codestral commercially?

The free tier is non-commercial. For production or commercial use you need a paid plan or a different model.

How do I start using Codestral?

Get a free API key from the provider dashboard. Set the base URL to https://api.mistral.ai/v1 and the model to codestral-latest. Dedicated code model with a free “Codestral” API key - fill-in-the-middle + chat.

Building with this model?

We wire free-tier and open-weight models into production stacks: evals against your real inputs, failover, cost caps.

Free monthly update

The monthly free-models update

What is newly free, what got rate-limited, and what to switch to. One email a month. Unsubscribe anytime.

Related free models