Mistral AI Guide 2025: Models, API & Le Chat
Mistral AI is a French AI company with genuinely open-weight models (Apache 2.0), a free Le Chat interface, EU servers for GDPR compliance, and competitive API pricing. This guide covers every model, the API setup, and Codestral for coding.
1. What is Mistral AI?
Mistral AI is a Paris-based AI company founded in April 2023 by former DeepMind and Meta AI researchers. It stands out for two reasons: it publishes genuinely open-weight models under the Apache 2.0 license (meaning you can use them commercially for free), and its closed frontier models are competitive with OpenAI at a lower price.
What makes Mistral different
2. Mistral model lineup
| Model | Type | Input price | Context | Best for |
|---|---|---|---|---|
| mistral-7b-v0.3 | Open-weight | Free (self-host) | 32k | Self-hosting, free experiments |
| mixtral-8x7b | Open-weight MoE | Free (self-host) | 32k | Reasoning, coding, free |
| mistral-small-latest | API (closed) | $0.10/1M | 32k | High-volume, cost-sensitive |
| open-mistral-nemo | Open-weight | $0.14/1M (API) | 128k | Long documents, low cost |
| mistral-large-latest | API (closed) | $3/1M | 128k | Complex tasks, tool use, coding |
| codestral-latest | Code API | $1/1M | 32k | Code completion, FIM |
| pixtral-large-latest | Multimodal API | $3/1M | 128k | Vision + text tasks |
All API prices are per 1M input tokens. Output tokens are 3× input price for Large. Check console.mistral.ai for current pricing.
3. Le Chat — free Mistral interface
Le Chat is Mistral's free ChatGPT-equivalent at le.chat.mistral.ai. No API key needed — just create a free account and start chatting with Mistral's models.
What Le Chat includes (free)
4. API setup
The Mistral API lives at api.mistral.ai/v1 and is fully compatible with the OpenAI API format. Get a key from console.mistral.ai.
Create account at console.mistral.ai
Sign up free — no credit card required for the free tier (1 req/sec, 500k tokens/month). Add billing to upgrade to higher rate limits.
Install the SDK
Or use the OpenAI SDK — it works without changes (just override base_url and api_key).
Set your API key as an environment variable
5. Python code examples
Using the Mistral SDK
from mistralai import Mistral
client = Mistral(api_key="YOUR_MISTRAL_API_KEY")
response = client.chat.complete(
model="mistral-large-latest",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain the difference between REST and GraphQL."}
]
)
print(response.choices[0].message.content) Using the OpenAI SDK (drop-in replacement)
If your codebase already uses the OpenAI SDK, switching to Mistral takes 2 lines:
from openai import OpenAI
# Mistral is OpenAI-compatible — just change base_url and api_key
client = OpenAI(
base_url="https://api.mistral.ai/v1",
api_key="YOUR_MISTRAL_API_KEY"
)
response = client.chat.completions.create(
model="mistral-large-latest",
messages=[{"role": "user", "content": "Hello from OpenAI SDK!"}]
)
print(response.choices[0].message.content) 6. Codestral for coding
Codestral is Mistral's dedicated code model. Its key feature is Fill-In-the-Middle (FIM) completion — it predicts what goes between a prefix and suffix, which is exactly what IDE autocomplete needs.
Codestral specs
32,000 tokens
80+ supported
codestral.mistral.ai/v1
$1/1M input tokens
Important: Codestral uses a separate API endpoint (codestral.mistral.ai/v1) and requires a separate API key from console.mistral.ai. You cannot use your regular Mistral API key with this endpoint.
IDE integrations
7. Mistral vs OpenAI vs Anthropic
| Feature | Mistral | OpenAI | Anthropic |
|---|---|---|---|
| Best frontier model | Mistral Large 2 | GPT-4o | Claude Sonnet 4.5 |
| Input price (frontier) | $3/1M | $2.50–$5/1M | $3/1M |
| Open-weight models | ✓ Yes (Apache 2.0) | ✗ No | ✗ No |
| EU data residency | ✓ Yes | ✗ US only | ✗ US only |
| Coding model | Codestral (FIM) | GPT-4o (no FIM) | Claude (no FIM) |
| Multimodal | Pixtral (vision) | GPT-4o (vision + voice) | Claude (vision) |
| Free chat UI | Le Chat (free) | ChatGPT (limited free) | Claude.ai (limited free) |
| OpenAI compatible | ✓ Yes | Native | ✓ Yes (SDK) |
When to choose Mistral
Monitor Mistral AI API status at Prismix
Check live Mistral API status, 30-day uptime, and incident history. Get free alerts when the Mistral API is degraded or down.
FAQ
What is Mistral AI?
Mistral AI is a French AI company founded in 2023 that builds both open-weight and closed frontier models. It offers open-weight models like Mistral 7B (Apache 2.0, free commercially) and closed API models like Mistral Large 2 and Codestral. It also provides Le Chat, a free ChatGPT-style interface.
Is Mistral AI free to use?
Le Chat is free with unlimited basic access. Mistral 7B and Mixtral are open-weight (free to self-host, Apache 2.0). The API has a free tier (1 req/sec, 500k tok/mo); paid tiers start from $0.10/1M (Mistral Small) to $3/1M (Mistral Large 2).
How does Mistral compare to OpenAI?
Mistral Large 2 is competitive with GPT-4o on coding and reasoning at a lower or similar price. Mistral has open-weight models and EU servers for GDPR compliance. OpenAI has more multimodal features (DALL-E, voice, vision) and a larger ecosystem.
What is Codestral?
Codestral is Mistral's dedicated code model with Fill-In-the-Middle (FIM) completion, 32k context, 80+ programming languages, and $1/1M pricing. It uses a separate endpoint: codestral.mistral.ai/v1 and requires its own API key.