# Mistral AI API **Provider:** Mistral AI **Category:** ai **Base URL:** `https://api.mistral.ai/v1` **Auth:** bearer โ€” `Authorization: Bearer ...` **Rate Limit:** 1 request/s ยท 500,000 TPM **Free Tier:** No **Pricing:** from $0.10/mo (pay-as-you-go) **Docs:** https://docs.mistral.ai ## Description Mistral AI offers frontier open and commercial models via REST API. Mistral Large 2 rivals top closed models; Codestral specializes in code generation; Mistral Embed handles semantic search. The API is OpenAI-compatible โ€” simply change the base URL and model name. ## Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | POST | `https://api.mistral.ai/v1/chat/completions` | OpenAI-compatible chat completions | | POST | `https://api.mistral.ai/v1/embeddings` | Generate text embeddings | | POST | `https://api.mistral.ai/v1/fim/completions` | Fill-in-the-middle for code (Codestral) | | GET | `https://api.mistral.ai/v1/models` | List available models | ## Authentication Standard Bearer token authentication using your Mistral API key. ``` Authorization: Bearer ... ``` ## Sample Request ```bash 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": "Write a haiku about APIs."}] }' ``` ## Sample Response ```json { "id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "mistral-large-latest", "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Keys unlock the gate / Data flows through silent paths / Endpoints never sleep" }, "finish_reason": "stop" }], "usage": {"prompt_tokens": 15, "completion_tokens": 18} } ``` ## Pricing Details Mistral Medium 3: $0.40/M input, $2.00/M output. Mistral Small 3.1: $0.03/M input, $0.11/M output. Mistral Nemo: $0.02/M. Codestral: $0.20/M input, $0.60/M output. Mistral Large 2: $2.00/M input, $6.00/M output. Free experiment plan available. --- *Source: [API Map](https://apimap.dev/apis/mistral/) โ€” CC BY 4.0*