Black prism refracting a red laser beam into a precise spectrum: Mistral AI transforms raw text into structured, high-quality language outputs.
Like a prism that splits light into its precise components, Mistral models decompose language tasks into efficient, targeted outputs without wasting compute.

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.

Models
Mistral Large 2 Mistral Small 3.2 Codestral Mistral NeMo 12B Open-weight: NeMo, 7B, Mixtral 8x7B released under Apache 2.0
Access
la Plateforme API le Chat (Consumer) Azure AI Foundry AWS Bedrock
Self-host
Ollama vLLM Hugging Face Open-weight models run on a single A100 or Apple M2 Max
Specialised
Codestral (code) Mistral Embed Mistral Moderation

Installation

Mistral’s API is OpenAI-compatible. Use the official SDK or the openai package with a base URL override.

bash
pip install mistralai
python
from 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):

python
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.

python
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.

python
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)
Step 1 Choose model tier Mistral Small for high-volume, cost-sensitive tasks. Large for complex reasoning and long context.
Step 2 Select access route la Plateforme for direct API, Azure AI Foundry for Microsoft compliance envelope, Bedrock for AWS VPC.
Step 3 Integrate OpenAI-compatible. Swap base URL; existing code works without refactoring.
Step 4 Monitor costs Set budget alerts on la Plateforme dashboard. Mistral Small is 10-20x cheaper than Large for the same prompt.

Pricing (la Plateforme, as of June 2026)

ModelInput per 1M tokensOutput 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.10n/a

Comparison with alternatives

Mistral Large 2GPT-4oClaude Sonnet 4.6Llama 3.3 70B
Data residencyEU (Paris)USUSSelf-host or US
Open weightNoNoNoYes (Apache 2.0)
Languages12 (strong FR/DE)50+10+50+
Context window128K128K200K128K
Price (input/1M)€2.00~€4.50~€3.00~€0.80
GDPR DPAYes (EU entity)SCCs requiredSCCs requiredSelf-host
Best forEU-regulated enterpriseGeneral purposeLong documentsCost-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