# Mistral (https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints/mistral)

Mistral provides its own family of chat and embedding models, used in LibreChat as a custom endpoint.

## Get an API key

Create a key from the [Mistral console](https://console.mistral.ai/). Add it to your `.env` file:

```bash filename=".env"
MISTRAL_API_KEY=your-api-key
```

## Configuration

Add the endpoint under `endpoints.custom` in your `librechat.yaml`:

```yaml filename="librechat.yaml"
    - name: "Mistral"
      apiKey: "${MISTRAL_API_KEY}"
      baseURL: "https://api.mistral.ai/v1"
      models:
        default: ["mistral-tiny", "mistral-small", "mistral-medium", "mistral-large-latest"]
        fetch: true
      titleConvo: true
      titleModel: "mistral-tiny"
      modelDisplayLabel: "Mistral"
      dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"]
```

## Notes

- The Mistral API only allows a system message at the top of the messages payload.
- The API is strict with unrecognized parameters and its errors are not descriptive (often just "no body"). Using [`dropParams`](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#dropparams) to drop `user`, `frequency_penalty`, and `presence_penalty` is required.
- `stop` is no longer a default parameter, so it does not need to be in [`dropParams`](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#dropparams) unless you want to prevent users from configuring it.
- Fetching the model list is supported, but be careful not to select embedding models for chat.
