> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mistralai

> Python API reference for the mistralai llm provider.

> [card] [Usage guide](https://docs.zeroruntime.ai/runtime-sdk/plugins/llm/mistralai.md)
>
> Setup, environment variables, and Python/JavaScript/Go usage examples.

## MistralAILLM

Text generation with Mistral's models, using your own Mistral key. Good for
multilingual conversational agents with tool calling.

Authenticates with MISTRALAI\_API\_KEY from your environment, or an explicit
`api_key`.

```python theme={null}
from zeroruntime.plugins import MistralAILLM  # direct to the vendor, with your key
```

### Fields

**model** `str` (default: UNSET)

Mistral model name, e.g. "mistral-small-latest" or "mistral-medium-latest". Defaults to 'mistral-small-latest'.

**base\_url** `str` (default: UNSET)

Base URL of the Mistral API. Change it only when routing through a proxy or compatible endpoint. Defaults to '[https://api.mistral.ai/v1](https://api.mistral.ai/v1)'.

**temperature** `float` (default: UNSET)

Sampling temperature. Lower values give more focused, repeatable replies. Defaults to 0.7.

**tool\_choice** `Literal['auto', 'required', 'none']` (default: UNSET)

How the model may call tools: "auto" lets it decide, "required" forces a tool call, "none" disables tools. Defaults to 'auto'.

**max\_completion\_tokens** `int | None` (default: UNSET)

Maximum number of tokens the model may generate per reply. Leave unset for no explicit limit. Defaults to None (not set).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.