mistralai
Python Client SDK for the Mistral AI API.
Install
mistralai on PyPI
pip
pip install mistralaiuv
uv add mistralaipoetry
poetry add mistralaiPackage facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — eval-type-backport, httpx, jsonpath-python, opentelemetry-api, opentelemetry-semantic-conventions, pydantic, python-dateutil, typing-inspection |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: mistralai-2.9.3-py3-none-any.whl
About mistralai
from the package's own PyPI description — quoted content, verbatim
Mistral Python Client
Migrating from v1
If you are upgrading from v1 to v2, check the migration guide for details on breaking changes and how to update your code.
API Key Setup
Before you begin, you will need a Mistral AI API key.
- Get your own Mistral API Key: <https://docs.mistral.ai/#api-access>
- Set your Mistral API Key as an environment variable. You only need to do this once.
# set Mistral API Key (using zsh for example)
$ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv
# reload the environment (or just quit and open a new terminal)
$ source ~/.zshenv
<!-- Start Summary [summary] -->
Summary
Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on La Plateforme to get access and read the docs to learn how to use it. <!-- End Summary [summary] -->
<!-- Start Table of Contents [toc] -->
Table of Contents
<!-- $toc-max-depth=2 --> * Mistral Python Client * Migrating from v1 * API Key Setup *...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Official Python client for the Mistral AI API, enabling synchronous and asynchronous chat completions, embeddings, file uploads, and agent interactions with Mistral's language models.
Low install friction with a pure-Python wheel and eight well-established runtime dependencies (httpx, pydantic, opentelemetry-api, python-dateutil, and others). Active maintenance with a release on 2026-08-13 and 761 GitHub stars.
License treatment is unclear—no SPDX identifier or raw license text is declared in the package metadata, so the actual terms governing use and redistribution are not immediately verifiable from the fact sheet.
Usage
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)
Requires Python 3.10 or later; MISTRAL_API_KEY environment variable must be set with a valid Mistral AI API key.
Verdict: A well-maintained, actively developed official SDK for Mistral AI's API with low install friction and no known vulnerabilities. Suitable for production use, but the unclear license status warrants verification before adopting in proprietary or compliance-sensitive contexts.
Needs verification
- What is the actual license governing mistralai 2.9.3? (SPDX and raw license text are both null in metadata)
- Are there any undisclosed dependencies or system-level requirements beyond Python 3.10?
Similar packages
permissive · top 100 on PyPI
supabase-functionspermissive · top 1,000 on PyPI
strands-agentspermissive · top 1,000 on PyPI
llama-index-llms-openaipermissive · top 1,000 on PyPI
openai-agentspermissive · top 1,000 on PyPI
openaipermissive · top 1,000 on PyPI
anthropicpermissive · top 1,000 on PyPI
groqpermissive · top 1,000 on PyPI
gspreadpermissive · top 1,000 on PyPI
twinepermissive · top 1,000 on PyPI