TensaHub › Mistral La Plateforme

Mistral La Plateforme

Free “Experiment” tier,已收录 1 个模型。提供 curl、Python、JavaScript 示例及在线测试。

在目录中测试并评分

类型
服务商
服务商
Mistral La Plateforme
价格
免费 + 付费
无需密钥访问
否
密钥环境变量
MISTRAL_API_KEY
Base URL(兼容 OpenAI)
https://api.mistral.ai/v1
输入
文本
开发者评分
暂无评分
文档
https://docs.mistral.ai/deployment/laplateforme/tier/
获取密钥
https://console.mistral.ai/api-keys
最近检查
2026-12-04T20:20:29+00:00

代码示例

cURL

curl https://api.mistral.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -d '{"model":"mistral-small-latest","messages":[{"role":"user","content":"你好,请用一句话介绍你自己。"}]}'

Python

# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.mistral.ai/v1", api_key=os.environ["MISTRAL_API_KEY"])
r = client.chat.completions.create(
    model="mistral-small-latest",
    messages=[{"role": "user", "content": "你好,请用一句话介绍你自己。"}],
)
print(r.choices[0].message.content)

JavaScript

// npm install openai
import OpenAI from 'openai'

const client = new OpenAI({ baseURL: 'https://api.mistral.ai/v1', apiKey: process.env.MISTRAL_API_KEY })
const r = await client.chat.completions.create({
  model: 'mistral-small-latest',
  messages: [{ role: 'user', content: '你好,请用一句话介绍你自己。' }],
})
console.log(r.choices[0].message.content)

生成集成代码 →

热门搜索

常见问题

Mistral La Plateforme API 免费吗?

Mistral La Plateforme 提供有限的免费额度,超出部分需付费。

如何在代码中调用 Mistral La Plateforme?

Mistral La Plateforme 在 https://api.mistral.ai/v1 提供兼容 OpenAI 的 API:使用任意 OpenAI SDK(Python、JavaScript 等)并设置该基础 URL 即可。 开发者工具箱中提供了即用代码(流式输出、JSON、重试)。

替代方案