# Mistral AI API — card for AI agents

Mistral's open-weight and commercial models via API, priced per 1M tokens.

Maker: Mistral AI · category: Model hosting and inference

## Price (official page)
- Free tier: none listed
- Usage price: e.g. Mistral Large $0.5 per million input tokens, $1.5 per million output; batch processing 50% off
- Pricing page: https://mistral.ai/pricing (checked 2026-10-09)

## Connect
- npm: `npm install @mistralai/mistralai`
- PyPI: `pip install mistralai`
- Repository: https://github.com/mistralai/client-ts

## For AI agents on Mistral AI's own site (AgentGid check 2026-11-13: 4 of 6)
- llms.txt: https://mistral.ai/llms.txt
- Docs pages as Markdown: 0% of the pages llms.txt lists
- OpenAPI description: https://docs.mistral.ai/openapi.yaml
- Official MCP server: no · official SDK: yes · status page: no
- robots.txt lets AI assistants (ChatGPT-User, Claude-User) read the site: yes

## A year of price history (Internet Archive copies of the pricing page, read by rules)
- Months read: 7 (2025-10 to 2026-11) of https://mistral.ai/pricing
- Lowest $/month figure on the page: $14.99 in 2025-10, $5.99 in 2026-11
- 2026-09: new figures $10/mo, $15/mo, $30/mo (archived copy: https://web.archive.org/web/20260901163208/https://mistral.ai/pricing/)
- A figure is any "$X/month" on the page (plans, seats and add-ons alike); open the archived copy to see which plan it is.

## Price history in AgentGid's catalog (since 2026-10-22)
- Changes recorded: 0 (a vendor price change or an editor's correction; the evidence archive keeps the pricing page of each date)

## Other APIs in this category
- OpenAI API: https://agentgid.com/apis/openai-api/agent.md
- Gemini API: https://agentgid.com/apis/google-gemini-api/agent.md
- Groq (LLM inference): https://agentgid.com/apis/groq/agent.md
- Cohere: https://agentgid.com/apis/cohere/agent.md
- fal: https://agentgid.com/apis/fal/agent.md

## Links
- AgentGid page: https://agentgid.com/apis/mistral-api/


## Mistral AI API: French AI models for text, documents and code

The Mistral AI API lets your app send text, images or documents to Mistral's AI models and get answers back. It covers chat, reading scanned documents, turning text into searchable numbers, speech and code. You pay per amount of text processed, after adding a payment method; the free plan does not include the API.

### Where to use it
- Answers and summaries in your app: Add a chat box, a "summarise this" button or automatic replies, using a small model that costs little per message.
- Turn emails into tidy records: Pull the customer, topic and priority out of a support email straight into the fields of your helpdesk.
- Read scanned documents and PDFs: Turn invoices, contracts or scanned pages into text and tables your app can search and store.
- Search help articles by meaning: Find the help article closest to a question, even when it uses other words, such as "money back" for a refund policy.
- Process a large pile overnight: Send thousands of texts as one batch job when you do not need instant answers, at half the price.
- Switch from OpenAI with small changes: Move an existing chatbot to Mistral by changing the client, the setup line and the model name. (idea, not from the official pages)

### How to start
- Create a Mistral account, activate billing with a payment method, then create an API key in Studio; the key is shown only once.
- Store the key in the MISTRAL_API_KEY variable and install the official package.

```
export MISTRAL_API_KEY="your-api-key"
uv add mistralai
```

- Send a first chat request (the Python example is in the first use above).

```
curl https://api.mistral.ai/v1/chat/completions \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral-small-latest",
    "messages": [{"role": "user", "content": "Hello, Mistral!"}]
  }'
```


### License
You pay per use, and you own what the models produce for you. Several models are also released as open weights, many under Apache 2.0, so you can run them yourself.

### Good to know
- The free plan covers trying Le Chat and Studio but not the API; using the API needs billing turned on and prepaid credit.
- By default your API calls may be used to improve Mistral's models; an admin can turn this off in the Privacy menu.
- If the monthly spending limit is reached, API access can stop until the next month or until an admin raises the limit.
- Models are retired on a schedule; Mistral Large 3, for example, is marked deprecated with a retirement date in 2027.
- Images made with Mistral may not be used to train a competing image generator.

Checked 2026-11-10 against: https://mistral.ai, https://mistral.ai/pricing, https://docs.mistral.ai/llms.txt, https://docs.mistral.ai/inference/quickstarts/send-your-first-request.md, https://docs.mistral.ai/getting-started/quickstarts/studio/activate-and-generate-api-key.md, https://docs.mistral.ai/getting-started/clients.md, https://docs.mistral.ai/inference/pricing.md, https://docs.mistral.ai/inference/model-selection-guide.md, https://docs.mistral.ai/inference/model-lifecycle.md, https://docs.mistral.ai/models.md, https://docs.mistral.ai/inference/batch-processing.md, https://docs.mistral.ai/inference/quickstarts/get-structured-output.md, https://docs.mistral.ai/inference/quickstarts/create-embeddings.md, https://docs.mistral.ai/studio/document-processing/basic_ocr.md, https://docs.mistral.ai/resources/error-glossary.md, https://docs.mistral.ai/resources/mcp.md, https://docs.mistral.ai/resources/migration-guides.md, https://docs.mistral.ai/admin/billing-usage/usage-limits.md, https://docs.mistral.ai/admin/identity-access/api-keys.md, https://docs.mistral.ai/admin/monitor-comply/zero-data-retention.md, https://docs.mistral.ai/studio/audio/deprecated/speech_to_text/realtime_transcription/client_auth.md, https://legal.mistral.ai/terms/get-started/, https://legal.mistral.ai/terms/commercial-terms-of-service/, https://legal.mistral.ai/terms/data-processing-addendum/, https://help.mistral.ai/en/articles/455207-can-i-opt-out-of-my-input-or-output-data-being-used-for-training, https://help.mistral.ai/en/articles/347612-can-i-activate-zero-data-retention-zdr, https://pypi.org/pypi/mistralai/3.7.0/json, https://registry.npmjs.org/@mistralai/mistralai/3.5.0

### Mistakes to avoid
- Don't: from mistralai import Mistral → Do: from mistralai.client import Mistral (The import path changed in SDK version 2; with mistralai 3.7.0 the old import fails with ImportError (our local check).)
- Don't: Putting MISTRAL_API_KEY in browser code to call the API directly → Do: Call Mistral from your server; for browser realtime transcription mint short-lived rt_ tokens on the server (Browsers cannot keep long-lived keys safe.)
- Don't: Retrying a 401, 402 or 422 in a loop → Do: Retry only 429 and 5xx with exponential backoff; fix the key, billing or request for other errors (The docs list only 429, 500, 502, 503 and 504 as transient.)
- Don't: Hard-coding a dated model name like mistral-large-2512 and forgetting it → Do: Check the models page for status and retirement dates, and move to the replacement in time (Mistral Large 3 (mistral-large-2512) is deprecated, with Mistral Large 4 as its replacement.)
- Don't: Sending a private PDF link to OCR → Do: Use a public URL, a Base64-encoded PDF, or upload the file (The OCR service has to fetch the document itself.)

### Questions
- Is there a free tier for the API? No. The free plan does not include API access; creating keys and calling the API need billing activation and pay-as-you-go.
- Who owns the text the models write for me? You do. The commercial terms say the customer owns all output.
- Can I keep my prompts out of model training? Yes. An admin turns off the anonymous improvement data toggle in the Admin Panel's Privacy menu.
- Is it hard to move from OpenAI? Usually not. The chat request has the same structure, so you change the client import, the setup call and the model name.
- Which languages have official packages? Python and TypeScript.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
