Mistral AI REST API
Open-weight AI models with frontier-level performance
Mistral AI provides state-of-the-art large language models through a simple REST API. Developers use Mistral for chat completions, embeddings, and function calling with models like Mistral Large, Mistral Small, and open-weight alternatives. The API offers streaming responses, JSON mode, and tool integration for building AI-powered applications with competitive pricing and performance.
https://api.mistral.ai/v1
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /chat/completions | Generate chat completions using Mistral models with support for streaming, function calling, and JSON mode |
| POST | /embeddings | Create vector embeddings from text using Mistral's embedding models for semantic search and RAG applications |
| GET | /models | List all available Mistral models with their capabilities, pricing, and context window sizes |
| POST | /fim/completions | Fill-in-the-middle completions for code generation and completion tasks with Codestral models |
| POST | /agents/completions | Execute agent workflows with function calling and tool use for autonomous task execution |
| GET | /models/{model_id} | Retrieve detailed information about a specific Mistral model including parameters and capabilities |
| POST | /moderations | Analyze content for policy violations, harmful content, and safety guardrails |
| POST | /classifiers | Classify text into predefined categories using Mistral's classification capabilities |
| GET | /files | List uploaded files used for fine-tuning and retrieval augmented generation |
| POST | /files | Upload files for fine-tuning datasets or document retrieval in RAG applications |
| DELETE | /files/{file_id} | Delete a previously uploaded file from Mistral storage |
| POST | /fine_tuning/jobs | Create a fine-tuning job to customize Mistral models on your specific dataset |
| GET | /fine_tuning/jobs | List all fine-tuning jobs with their status, metrics, and configuration |
| GET | /fine_tuning/jobs/{job_id} | Get detailed status and metrics for a specific fine-tuning job |
| DELETE | /fine_tuning/jobs/{job_id} | Cancel an in-progress fine-tuning job |
Sponsor this page
AvailableReach developers actively building with Mistral AI. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl https://api.mistral.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MISTRAL_API_KEY" \
-d '{
"model": "mistral-large-latest",
"messages": [
{
"role": "user",
"content": "What is the best French cheese?"
}
],
"temperature": 0.7,
"max_tokens": 1000
}'
Use Mistral AI from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Mistral AI. Paste your Mistral AI API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Mistral AI directly with your credentials — no local install, works on mobile.
mistral_chat
Generate conversational responses using Mistral's chat models with context awareness and streaming support
mistral_embed
Create semantic embeddings for text to enable similarity search, clustering, and retrieval augmented generation
mistral_function_call
Execute structured function calls with Mistral models for tool use, API integration, and autonomous agents
mistral_code_complete
Generate code completions and fill-in-the-middle suggestions using Codestral models for development workflows
mistral_moderate
Analyze and classify content for safety, policy compliance, and harmful content detection with Mistral's moderation system
Connect in 60 seconds
Paste your Mistral AI key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Mistral AI to your AI →