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

# Mistral

> 了解如何配置和使用 Mistral AI 模型，包括 Codestral，与 Cline 一起使用。涵盖 API 密钥设置和模型选择。

Cline 支持通过 Mistral AI API 访问模型，包括标准 Mistral 模型和专门用于代码的 Codestral 模型。

**网站：** [https://mistral.ai/](https://mistral.ai/)

### 获取 API 密钥

1. **注册/登录：** 访问 [Mistral 平台](https://console.mistral.ai/)。创建账户或登录。你可能需要通过验证过程。
2. **创建 API 密钥：**
   * [La Plateforme API 密钥](https://console.mistral.ai/api-keys/) 和/或
   * [Codestral API 密钥](https://console.mistral.ai/codestral)

### 支持的模型

Cline 支持以下 Mistral 模型：

* pixtral-large-2411
* ministral-3b-2410
* ministral-8b-2410
* mistral-small-latest
* mistral-medium-latest
* mistral-small-2501
* pixtral-12b-2409
* open-mistral-nemo-2407
* open-codestral-mamba
* codestral-2501
* devstral-small-2505

**注意：** 模型可用性和规格可能会发生变化。
请参考 [Mistral AI 文档](https://docs.mistral.ai/api/) 和 [Mistral 模型概述](https://docs.mistral.ai/getting-started/models/models_overview/) 获取最新信息。

### 在 Cline 中配置

1. **打开 Cline 设置：** 点击 Cline 面板中的设置图标（⚙️）。
2. **选择提供商：** 从"API 提供商"下拉菜单中选择"Mistral"。
3. **输入 API 密钥：** 如果你使用标准 `mistral` 模型，将你的 Mistral API 密钥粘贴到"Mistral API 密钥"字段中。如果你打算使用 `codestral-latest`，请参阅下面的"使用 Codestral"部分。
4. **选择模型：** 从"模型"下拉菜单中选择你想要的模型。

### 使用 Codestral

[Codestral](https://docs.mistral.ai/capabilities/code_generation/) 是专门为代码生成和交互而设计的模型。
对于 Codestral，你可以使用不同的端点（默认：codestral.mistral.ai）。
如果为 Codestral 使用 La Plateforme API 密钥，请将 **Codestral 基础 URL** 更改为：`https://api.mistral.ai`

要在 Cline 中使用 Codestral：

1. **在 Cline 设置中选择"Mistral"作为 API 提供商。**
2. **选择 Codestral 模型**（例如，`codestral-latest`）从"模型"下拉菜单中。
3. **输入你的 Codestral API 密钥**（来自 `codestral.mistral.ai`）或你的 La Plateforme API 密钥（来自 `api.mistral.ai`）到 Cline 中相应的 API 密钥字段。


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