mistralai
Python Client SDK for the Mistral AI API.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained (release 1 day old), has no known vulnerabilities, low install friction, and ranks in the top 1000 PyPI packages by download volume. The only caveat is that license terms are not declared in metadata—verify the actual license in the repository before use in proprietary contexts. For any Mistral AI API integration, this is the official and recommended client.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- A Mistral API key must be set as the MISTRAL_API_KEY environment variable before use.
- Low install friction with a pure-Python wheel distribution.
License · maintenance · safety
(unclear) — License treatment is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or restricted contexts.
last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 761 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 49,642,470 downloads/mo, #580 on PyPI
Alternatives
Verify before relying
pip install mistralai
from mistralai.client import Mistral
import os
with Mistral(api_key=os.getenv("MISTRAL_API_KEY")) as mistral:
res = mistral.chat.complete(
model="mistral-large-latest",
messages=[{"role": "user", "content": "Hello"}]
)
print(res)- Actual license terms and conditions (SPDX identifier not declared in metadata)
- Whether agents feature requires separate installation of mistralai[agents] extra or if it is included by default
- Specific rate limits, quotas, or API tier requirements for production use
What it is and what it does
mistralai is the official Python client for Mistral AI's hosted API services. It wraps the Chat Completion, Embeddings, File Upload, and Agents APIs behind a unified SDK interface, supporting both synchronous and asynchronous request patterns. The client handles authentication via API key, request serialization using pydantic, HTTP transport via httpx, and includes built-in telemetry hooks through opentelemetry.
Developers use it to integrate Mistral's language models into Python applications without managing raw HTTP calls. The SDK provides context managers for resource cleanup, streaming support for real-time responses, and error handling for API failures. It requires Python 3.10+ and is actively maintained with frequent releases.
Use it for
- Build chatbot or conversational AI applications by calling mistral.chat.complete() with user messages and model selection.
- Generate embeddings for semantic search or document similarity by using the embeddings API through the same client.
- Upload documents or files to Mistral's workspace and reference them in agent or chat requests.
- Implement async workflows in concurrent applications using mistral.chat.complete_async() and other async methods.
- Integrate observability into LLM calls via opentelemetry instrumentation hooks built into the client.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained (release 1 day old), has no known vulnerabilities, low install friction, and ranks in the top 1000 PyPI packages by download volume. The only caveat is that license terms are not declared in metadata—verify the actual license in the repository before use in proprietary contexts. For any Mistral AI API integration, this is the official and recommended client.
Install
mistralai on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a release just 1 day old and 761 repository stars. Eight runtime dependencies are all standard ecosystem packages (httpx, pydantic, opentelemetry libraries).
Requires Python 3.10 or later. A Mistral API key must be set as the MISTRAL_API_KEY environment variable before use.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or restricted contexts.
Quickstart
pip install mistralai
from mistralai.client import Mistral
import os
with Mistral(api_key=os.getenv("MISTRAL_API_KEY")) as mistral:
res = mistral.chat.complete(
model="mistral-large-latest",
messages=[{"role": "user", "content": "Hello"}]
)
print(res)
Verify before relying
- Actual license terms and conditions (SPDX identifier not declared in metadata)
- Whether agents feature requires separate installation of mistralai[agents] extra or if it is included by default
- Specific rate limits, quotas, or API tier requirements for production use
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packageseval-type-backporthttpxjsonpath-pythonopentelemetry-apiopentelemetry-semantic-conventionspydanticpython-dateutiltyping-inspection |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 49,642,470 / month, #580 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: mistralai-2.9.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mistral ai api client”
- mistralaiPython client SDK for the Mistral AI API, providing access to chat…
- langchain-mistralaiConnects Mistral AI language models to LangChain, enabling you to use…
- opentelemetry-instrumentation-mistralaiAutomatically captures and traces calls to the Mistral AI API using…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also fireworks-ai · mistralai-workflows · mistralai-vibe-sdk · orq-ai-sdk · xai-sdk · chunkr-ai · langchain-mistralai · opentelemetry-instrumentation-mistralai · openrouter · gigachat