Mistral AI
European LLM provider with open-weight models and a commercial API. Strong multilingual performance, competitive pricing, and EU data residency options.

Mistral AI is a Paris-based AI company founded in 2023 that builds and operates large language models. It offers open-weight models you can run yourself and a commercial API called la Plateforme. Mistral has become the default choice for teams that need a capable frontier LLM with EU data residency, strong French and German language performance, and transparent, Apache 2.0 licensing on its open models.
Installation
Mistral’s API is OpenAI-compatible. Use the official SDK or the openai package with a base URL override.
pip install mistralaifrom mistralai import Mistral
client = Mistral(api_key="YOUR_MISTRAL_API_KEY")
response = client.chat.complete(
model="mistral-large-latest",
messages=[{"role": "user", "content": "Summarise the EU AI Act in three bullet points."}]
)
print(response.choices[0].message.content)Via the openai SDK (drop-in replacement):
from openai import OpenAI
client = OpenAI(
api_key="YOUR_MISTRAL_API_KEY",
base_url="https://api.mistral.ai/v1"
)
chat = client.chat.completions.create(
model="mistral-small-latest",
messages=[{"role": "user", "content": "What is RAG?"}]
)Function calling
Mistral supports OpenAI-compatible function calling on all large models.
import json
from mistralai import Mistral
client = Mistral(api_key="YOUR_MISTRAL_API_KEY")
tools = [
{
"type": "function",
"function": {
"name": "get_company_info",
"description": "Return firmenbuch (company register) data for an Austrian company.",
"parameters": {
"type": "object",
"properties": {
"company_name": {"type": "string", "description": "Legal name of the company"},
"country": {"type": "string", "enum": ["AT", "DE", "CH"]}
},
"required": ["company_name", "country"]
}
}
}
]
response = client.chat.complete(
model="mistral-large-latest",
messages=[{"role": "user", "content": "Look up Erste Bank AG in Austria."}],
tools=tools,
tool_choice="auto"
)
tool_call = response.choices[0].message.tool_calls[0]
args = json.loads(tool_call.function.arguments)
print(args) # {'company_name': 'Erste Bank AG', 'country': 'AT'}Codestral for code generation
Codestral is a 22B model trained specifically on code, with a 256K context window. It supports 80+ programming languages and is available under a separate commercial licence.
client = Mistral(api_key="YOUR_MISTRAL_API_KEY")
response = client.chat.complete(
model="codestral-latest",
messages=[
{
"role": "user",
"content": "Write a FastAPI endpoint that accepts a PDF and returns extracted text using AWS Textract."
}
]
)
print(response.choices[0].message.content)Pricing (la Plateforme, as of June 2026)
| Model | Input per 1M tokens | Output per 1M tokens |
|---|---|---|
| Mistral Small 3.2 | €0.10 | €0.30 |
| Mistral Large 2 | €2.00 | €6.00 |
| Codestral | €0.20 | €0.60 |
| Mistral NeMo 12B | €0.10 | €0.30 |
| Mistral Embed | €0.10 | n/a |
Comparison with alternatives
| Mistral Large 2 | GPT-4o | Claude Sonnet 4.6 | Llama 3.3 70B | |
|---|---|---|---|---|
| Data residency | EU (Paris) | US | US | Self-host or US |
| Open weight | No | No | No | Yes (Apache 2.0) |
| Languages | 12 (strong FR/DE) | 50+ | 10+ | 50+ |
| Context window | 128K | 128K | 200K | 128K |
| Price (input/1M) | €2.00 | ~€4.50 | ~€3.00 | ~€0.80 |
| GDPR DPA | Yes (EU entity) | SCCs required | SCCs required | Self-host |
| Best for | EU-regulated enterprise | General purpose | Long documents | Cost-sensitive |
When not to use Mistral
Very long documents: Mistral Large 2 tops out at 128K tokens. If you need 500K+ context, use Gemini 2.0 or Claude claude-opus-4-8 with their 1-2M windows.
Computer vision: Mistral has no multimodal image input in the current API. Use GPT-4o or Gemini 2.0 Flash for image understanding.
Highly specific fine-tuning at scale: Mistral does offer fine-tuning, but Llama 3 gives you more control over training data and infrastructure at volume.
English-only consumer apps: If your users are English-only and price is not a primary concern, GPT-4o or Claude have marginally better benchmark results on pure English tasks.
Further reading
- la Plateforme documentation : API reference, model cards, rate limits
- Mistral model overview : Benchmark results and architecture notes for each model
- Mistralai Python SDK on PyPI : Package source and changelog
- Codestral licence : Commercial licence terms for code models
- LLM Landscape 2026 : Full comparison of all major LLM providers
- Building RAG Systems : How to build a retrieval-augmented generation pipeline with any LLM provider
- LLM Gateway Architecture : Route between Mistral, OpenAI, and Anthropic with fallback logic