GPT Image 2.5 is live — OpenAI's newest image model, targeted edits that leave the rest of the frame alone
全部教程与指南

· reAPI Team

Mistral API:免费模式、API 密钥、模型与价格

Mistral API 使用指南:在 Studio 创建密钥、免费模式包含什么、从 Mistral Large 4 到 Codestral 的模型价格,以及平台托管的第三方模型。

Mistral API:免费模式、API 密钥、模型与价格

Mistral API 可以免费开始使用。Mistral 的快速入门指南表示,免费模式“默认启用 API 访问,无需信用卡”,但有用量和速率限制。[1] 你可以在 console.mistral.ai 的 Studio 控制台创建密钥,然后将其作为 Bearer token 调用 https://api.mistral.ai/v1/chat/completions。[1][2] Mistral 的旗舰模型 Mistral Large 4,价格为每百万输入 token $0.70、每百万输出 token $2.10。[3]

有个细节可能出乎意料:该 API 已不只提供 Mistral 模型。其价格表还包含 Z.ai 的 GLM 5.3 和 DeepSeek V4.1 Flash。本文介绍密钥配置、截至 2026 年 11 月 4 日的完整模型与价格列表,以及如何选择。

怎么获取 Mistral API 密钥

根据 Mistral 的 Studio 快速入门指南:[1]

  1. 登录 console.mistral.ai 的 Studio 控制台。
  2. 在左侧边栏打开 API Keys,点击 Create new key。
  3. 为密钥命名,设置到期日期,并选择连接器访问范围:仅共享连接器,或私有及共享连接器。
  4. 立即复制密钥。Mistral 提醒,“完整密钥只显示一次”,关闭对话框后便无法再次获取。

将其保存为 MISTRAL_API_KEY。Mistral 官方 SDK 可通过 pip install mistralai 或 npm install @mistralai/mistralai 安装,也可以直接发送 HTTP 请求:[2]

curl https://api.mistral.ai/v1/chat/completions \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "mistral-large-latest", "messages": [{"role": "user", "content": "Summarize this in one line: ..."}]}'

Mistral 建议设置到期日期并定期轮换密钥;密钥一旦能正常使用,这些事情就容易被忘记。[1]

Mistral API 价格

以下为每百万 token 的价格,来自 Mistral 价格页:[3]

模型API 名称输入输出上下文许可证
Mistral Large 4mistral-large-4$0.70$2.101MMistral Ecosystem Open Weight License
Mistral Small 4mistral-small-2603$0.15$0.60256KApache 2.0
Codestralcodestral-2508$0.30$0.90128K
Ministral 3 14Bministral-14b-2512$0.20$0.20256KApache 2.0
Ministral 3 8Bministral-8b-2512$0.15$0.15256KApache 2.0
Ministral 3 3Bministral-3b-2512$0.10$0.10256KApache 2.0
Z.ai GLM 5.3zai-glm-5-3$1.40$4.401MMIT
Z.ai GLM 5.3 Flashzai-glm-5-3-flash$0.15$0.501MMIT
DeepSeek V4.1 Flash 1017deepseek-v4-1-flash-1017$0.30$1.201MMIT

上下文和许可证信息来自 Mistral 模型选择指南。[4] Mistral Large 4 的缓存输入费率为每百万 $0.07,是普通输入价格的十分之一。[3]

除了聊天模型,同一密钥还能访问其他类型的模型:[3]

  • OCR: Mistral OCR 4.1 每 1,000 页 $4,带标注则为每 1,000 页 $5;较旧的 OCR 3 分别为 $2 和 $3。
  • 语音转文字: Voxtral Mini Transcribe 3 每分钟 $0.0035,Voxtral Small Transcribe 3 为 $0.004,实时版本为 $0.008。
  • 文字转语音: Voxtral TTS 3 每百万字符 $13。
  • 向量嵌入: Mistral Embed 每百万 token $0.10,Codestral Embed 为 $0.15。
  • 内容审核: Mistral Moderation 2 免费。

模型指南还列出了 Shieldstral 1.0 和用于时间序列预测的 Timestral 1.0 模型;前者是 Mistral 实验性 Labs 档位中的安全模型,采用 Apache 2.0 许可证。[4] Mistral 将 Labs 模型描述为实验性且限时提供,因此不要在这些模型上搭建需要长期运行的生产系统。

一次典型 Mistral API 请求多少钱

一次包含 20,000 输入 token 和 2,000 输出 token 的请求,在 Mistral Large 4 上的费用为 0.02 × $0.70 + 0.002 × $2.10 = $0.0182,在 Mistral Small 4 上则为 0.02 × $0.15 + 0.002 × $0.60 = $0.0042。这是按标价计算的结果,并非实测账单;推理输出和缓存命中会改变实际金额。

对于长文档,表格中还有一个不太明显的答案。Mistral 列表中有四个模型具备 1M token 上下文,其中最便宜的并非 Mistral 模型:Z.ai GLM 5.3 Flash 的输入和输出价格分别为 $0.15 和 $0.50,相比之下,DeepSeek V4.1 Flash 为 $0.30 和 $1.20,Mistral Large 4 为 $0.70 和 $2.10。[3][4] 价格不等于质量,因此在决定采用之前,应将自己的文档分别交给各模型测试。

平台还提供哪些功能

该 API 属于一个功能更广的平台。Mistral 的快速入门指南涵盖了构建调用外部函数的智能体、将文档上传至知识 Library 以用于检索增强生成、持久化工作流,以及使用同一 API 密钥的终端工具 Vibe CLI。[6] 如果只需要调用模型,就不必使用这些功能,但这也解释了为什么控制台会在创建密钥时询问连接器访问范围。

Mistral 模型怎么选

Mistral 的选择指南按 0 到 5 分为每个模型的速度和性能评分。[4] 在其自行给出的评分中,Mistral Large 4 的速度为 5 分、性能为 4 分,上下文为 1M token;Mistral Small 4 分别为 4 分和 3.5 分,上下文为 256K。Codestral 专注代码,上下文为 128K。Ministral 3 系列模型以较低的性能(评分 1 到 2 分)换取低廉且输入输出相同的价格,更适合分类和简短信息提取,而非推理。

许可证也是实质性差异。Mistral Small 4 和 Ministral 3 系列模型采用 Apache 2.0,因此你也可以自行运行模型权重;Mistral Large 4 则采用 Mistral 自有的开放权重许可证,在商业场景自行部署前应先阅读其条款。[4]

FAQ

Mistral API 免费吗?

无需信用卡即可开始:Mistral 免费模式默认启用 API 访问,但有用量和速率限制。[1] 付费用量按上述价格以 token 计费。

Mistral API 兼容 OpenAI 吗?

其聊天接口为 /v1/chat/completions,使用 Bearer 认证和 messages 数组,结构与 OpenAI 的 Chat Completions 相同。[2] Mistral 也提供自己的 SDK。

Mistral API 上哪些模型的上下文最长?

有四个模型列出的上下文为 1M token:Mistral Large 4、Z.ai GLM 5.3、Z.ai GLM 5.3 Flash 和 DeepSeek V4.1 Flash。Mistral Small 4 和 Ministral 3 系列模型列出的是 256K,Codestral 为 128K。[4]

mistral-large-latest 指向什么?

它是 Mistral 快速入门指南中用于大型模型的别名;在生产代码中固定使用前,应查看模型卡,确认该别名当前解析到哪个版本。[2]

选择 Mistral API 还是其他服务商

如果你需要 Mistral 自有模型,尤其是 Mistral Large 4 或 Codestral,Mistral 平台是直接的获取途径,免费模式也能降低测试成本。对于它托管的第三方模型,应先比较价格再选择:核对于 2026 年 11 月 4 日,Mistral 列出的 DeepSeek V4.1 Flash 输入和输出价格分别为 $0.30 和 $1.20,低于 reAPI 的 DeepSeek V4.1 Flash 的 $0.40 和 $1.30。[5] reAPI 不提供 Mistral 自有模型。

参考资料

  1. Mistral AI. Activate Studio and generate an API key. 2026 年 11 月 4 日获取自 docs.mistral.ai
  2. Mistral AI. Send your first API request. 2026 年 11 月 4 日获取自 docs.mistral.ai
  3. Mistral AI. API pricing. 2026 年 11 月 4 日获取自 docs.mistral.ai/inference/pricing
  4. Mistral AI. Model selection guide. 2026 年 11 月 4 日获取自 docs.mistral.ai/inference/model-selection-guide
  5. reAPI. DeepSeek V4.1 Flash model page. 2026 年 11 月 4 日获取自 reapi.ai/models/deepseek-v4-1-flash
  6. Mistral AI. Documentation index (quickstarts and Labs). 2026 年 11 月 4 日获取自 docs.mistral.ai/llms.txt
全部教程与指南