
Mistral AI API: Access, Rate Limits & SDKs 2026
Mistral's API runs on La Plateforme with a free on-ramp and open weights. Large 3 is Apache-2.0, so the same model can be self-hosted with no per-token fee.
Mistral AI API verdict
Mistral's API runs on La Plateforme, now Studio, authenticated with a bearer MISTRAL_API_KEY and called through official.
Python and TypeScript SDKs, using client.chat.complete or client.chat.stream, or REST at https://api.mistral.ai/v1. A Free mode lets you start without billing, and tiers run from Mistral Large 3 down to Medium 3.5 and Small 4, many of them open-weight.
Mistral's API is the openness-first choice. Start free in Studio, build with the official Python or TypeScript SDK, and keep a real exit to self-hosting, because Large 3 and other models ship under Apache 2.0. Use the agents, RAG and workflow layers when you need tool-calling, document retrieval or durable pipelines, and reach for the dedicated OCR and Voxtral audio services rather than bolting them on. Plan model choice by job. Large 3 fits cheap, open, multimodal text and image understanding, but Mistral's own frontier-class Medium 3.5 fits agentic and coding work where Large 3 is weak and slow. Budget on low token prices with a Free-mode on-ramp, and manage scale through workspaces and usage limits in Admin.
- Mistral Large 3 is non-reasoning and slow, at 47.5 tokens a second, so for agentic and coding use Mistral points to Medium 3.5 instead.
- Access starts in Studio Free mode, but scale needs paid usage. Manage limits with isolated workspaces in Admin.
- The official SDKs use client.chat.complete, not the OpenAI chat.completions.create shape, so existing OpenAI code needs light adaptation.
- Because the weights are Apache-2.0, self-hosting is a real alternative to the API for data-sovereignty or cost reasons, at the price of running infrastructure.
- Auth
- Bearer MISTRAL_API_KEY
- Base URL
- api.mistral.ai/v1
- SDKs
- Python + TypeScript
- Free mode
- Studio Free mode
- Self-host
- Apache 2.0 weights
Build with the Mistral AI API
import os
from mistralai import Mistral
client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
response = client.chat.complete(
model="mistral-large-latest",
messages=[{"role": "user", "content": "What is the best French cheese?"}],
)
print(response.choices[0].message.content){
"choices": [{
"message": { "role": "assistant", "content": "Comte, Brie and Roquefort..." },
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 11, "completion_tokens": 24 }
}- Cost levers: self-host the Apache-2.0 open weights; smaller Mistral Small 4 for cheaper calls; Studio Free mode for prototyping.
- Handle: 401 (Invalid or missing MISTRAL_API_KEY), 429 (Rate limit / quota exceeded).
Real Mistral AI code from the official docs. The raw cURL hello-world is the code block above; full limits and endpoints are in the tables on this page.
Your first Mistral AI API request
curl https://api.mistral.ai/v1/chat/completions \
-H "Authorization: Bearer ${MISTRAL_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "mistral-large-latest",
"messages": [{"role": "user", "content": "What is the best French cheese?"}]
}'How to authenticate with the Mistral AI API
| Aspect | Detail | Notes |
|---|---|---|
| Auth | Bearer MISTRAL_API_KEY | Generate a key in Studio |
| Base URL | https://api.mistral.ai/v1 | Chat completions at /v1/chat/completions |
| SDKs | Official Python (pip install mistralai) and TypeScript | Third-party SDKs for other languages |
| Free mode | Activate Studio in Free mode, generate a key | Start without billing |
| Models | mistral-large-latest, Medium 3.5, Small 4 | Many are open-weight |
| Platform | Studio (developer console + API), Vibe, Admin | Keys, Playground, evaluations, agents, SDKs |
| Self-host | Apache-2.0 weights on Hugging Face | Run on your own infrastructure |
Mistral AI core endpoints and features
| Capability | How | Purpose |
|---|---|---|
| Chat completion | client.chat.complete(...) | Text generation from messages |
| Streaming | client.chat.stream(...) | Stream tokens as generated |
| Function calling | tools[] + agent tool calls | Let the model call functions for real-world data |
| Vision | Multimodal messages (image input) | Analyze images alongside text |
| RAG | Document search + retrieval | Query uploaded documents with retrieval |
| Workflows | Durable AI pipeline + worker | Scaffold and trigger durable executions |
| OCR | OCR 4 service | Paragraph-level bounding boxes + block labels |
| Audio | Voxtral transcribe + TTS | Live transcription and zero-shot voice cloning TTS |
Tiers, models and platform rules
| Limit | Detail | Notes |
|---|---|---|
| Free mode | Studio Free mode to start | Generate a key without billing |
| Workspaces | Isolated workspaces, keys, usage limits | Per organization in Admin |
| Model tiers | Large / Medium / Small open models | Pick by cost and capability |
| Context window | 256k tokens (Mistral Large 3) | Smaller than 1M-token peers |
| Self-host escape | Apache-2.0 weights, no per-token fee | Trade tokens for infrastructure |
| Admin controls | Org setup, billing, SSO, access policies | Control plane for the platform |
| Key handling | Read key from MISTRAL_API_KEY env var | Avoid hardcoding credentials |
SDKs, agents and developer fit
| Aspect | Detail | Notes |
|---|---|---|
| SDKs | Official Python + TypeScript, third-party others | client.chat.complete / .stream |
| Agents | Define tools, call functions, return data | Studio agents layer |
| Vibe | Unified agent for productivity and coding | Web, mobile, terminal, editor; Vibe CLI |
| Playground | Test prompts and compare model outputs | In Studio |
| Prompts & Skills | Reusable prompt templates and Skills | Versioned, repeatable methods |
| Frontier model | Mistral Medium 3.5 for agentic + coding | Newer than Large 3 for agentic use |
| API pricing (Large 3) | $0.50/1M in, $1.50/1M out | Independent cross-reference; varies by provider |
Mistral AI API FAQ
How do I authenticate with the Mistral API?
Activate Studio, where a Free mode is available, generate an API key, and store it in the MISTRAL_API_KEY environment variable. Send it as a bearer token. The simplest path is the official SDK: pip install mistralai, then create a Mistral client with your api_key and call client.chat.complete with a model like mistral-large-latest and your messages. The REST endpoint is https://api.mistral.ai/v1/chat/completions.
Which SDKs does Mistral offer?
Official SDK clients in Python, through pip install mistralai, and TypeScript, plus third-party SDKs for other languages. The Python client exposes client.chat.complete for completions and client.chat.stream for streaming. Note the shape is Mistral's own, with chat.complete, not the OpenAI chat.completions.create form, so OpenAI code needs light adaptation.
What can the Mistral platform do beyond chat?
La Plateforme, now Studio, adds streaming, function calling, structured output and vision on the chat models. It also brings a higher-level agents layer for defining tools and calling functions, plus document RAG for retrieval over uploaded documents. Durable workflows let you scaffold a pipeline, run a worker and trigger executions. Dedicated services cover OCR, through OCR 4 with bounding boxes and block labels, and audio, through Voxtral transcription and TTS.
Is there a free tier, and can I self-host Mistral?
Yes to both. Studio has a Free mode, so you can generate a key and start without billing, and scale moves to paid usage managed through workspaces and usage limits in Admin. Separately, Mistral Large 3 and other models are released under Apache 2.0. You can download the open weights and self-host them with no per-token fee, trading API cost for your own infrastructure.
Should I use Mistral Large 3 or another Mistral model via the API?
Use Mistral Large 3 for cheap, open, multimodal text and image understanding, where licensing and cost matter. For agentic and coding work, Mistral's own frontier-class Mistral Medium 3.5 is the recommended choice, since Large 3 is non-reasoning, slow at 47.5 tokens a second, and weak on agentic benchmarks. Mistral Small 4 is a smaller, efficient option, unifying instruct, reasoning and coding.
Sources & verification
| Source | What was checked | Last checked |
|---|---|---|
| Mistral Official | Official product page | July 10, 2026 |
| Artificial Analysis | Independent reference | July 10, 2026 |
| Mistral Developer docs | Sdks | July 10, 2026 |
| Mistral Developer docs | Product documentation | July 10, 2026 |
Every fact on this Mistral AI page is tied to a named source and a verification date. Freshness-sensitive figures trace to the sources above; verify against the vendor before relying on them.
Explore Mistral AI
Every page on Mistral AI in one place, you are on api.
