> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/ai/llm/providers/mistral.md).

# Mistral

Connect Mistral as an LLM integration.

Mistral AI runs the Mistral models.

## Get your credentials

1. Open the [Mistral console](https://console.mistral.ai/) and sign in.
2. Choose a plan for the workspace (the free *Experiment* plan is enough to try).
3. Go to **API Keys** and press **Create new key**; copy it, it is shown only once.
4. Pick a model from the [models overview](https://docs.mistral.ai/getting-started/models/), for example `mistral-large-latest`.

More in the provider's own guide: [Mistral quickstart](https://docs.mistral.ai/getting-started/quickstart/).

## Connect it in Cloud

**Where:** Project → Integrations → LLM → **Add New Integration** → Mistral → **Connect** · `/projects/<project>/ai/llms/integrations/new/mistral`

| Field            | Required | What it does                                                              | Example                   |
| ---------------- | -------- | ------------------------------------------------------------------------- | ------------------------- |
| API Key          | yes      | The Mistral key. Stored encrypted, never shown again.                     | `placeholder-mistral-key` |
| Endpoint         | no       | Another address for the Mistral API. Empty = Mistral's own.               | empty                     |
| Default Model    | no       | The model used when a request names none. Empty = the provider's default. | `mistral-large-latest`    |
| Integration Name | yes      | How the integration is listed in Norbix.                                  | `Mistral Large`           |

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-198abf2037eca9129c63061abd99d28633b8c2ad%2Fmistral-form-1.png?alt=media" alt="New Mistral Integration form filled with placeholder values"><figcaption><p>The filled form (the key is a made-up placeholder).</p></figcaption></figure>

Press **Save**. The title becomes *Editing Mistral integration*, the badges say **ENABLED** and **NOT TESTED**, the id (`int_…`) appears with a copy button, the key field is empty again with the note that the key will not be displayed, and the test panel appears at the bottom.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-3c83a58bfe26ddfd1a0f5291e267907e9a57d067%2Fmistral-saved-2.png?alt=media" alt="The Mistral integration after save: badges ENABLED and NOT TESTED, the integration id, and the Test integration panel"><figcaption><p>After save.</p></figcaption></figure>

## Test and set as default

**Test integration** checks only that Norbix can read the stored key; it does not call Mistral, so a wrong key also passes — see [Test an LLM integration](/codemash/cloud/ai/llm/test.md). Ask the [AI chat](/codemash/cloud/ai/ai-chat.md) a question to check it for real.

The first LLM of an environment gets the **DEFAULT** badge. To make this one the model the AI uses, pick it as the project's **Default LLM** — see [Set the default LLM](/codemash/cloud/ai/llm/set-default.md). To turn it off: [Disable or delete](/codemash/cloud/ai/llm/disable.md).

## Common errors

| Message                                                 | Cause                                                                                                                                                                                                             | Fix                                                   |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| *Required* under **API Key**                            | The key is empty — it is asked again on every save.                                                                                                                                                               | Type the key again.                                   |
| *Domain URL format is invalid* (`CM-ERRORS-DOMAIN-002`) | **Endpoint** is not a full address.                                                                                                                                                                               | Write it with `http://` or `https://`.                |
| *Error while running chat turn* when you ask the chat   | The provider refused the call: the key is wrong, deleted, or not yet active (new keys can take a few minutes) — Cloud does not show the reason; the server log has it (for example *Status: 401 (Unauthorized)*). | Wait a minute, or create a new key and save it again. |
