Mistral AI's cutting-edge code generation model specializing in low-latency, high-frequency tasks such as fill-in-the-middle (FIM), code completion, correction, and test generation. Features efficient architecture with 2x faster generation than its predecessor.
256K tokens
1
可用
价格最低
Mistral AI
$1.20/1M tokens
Mistral AI
按每百万输入与输出 token 的总成本排序。选择一行可查看提供商详情。
| 提供商 | 价格(每百万) | 速率限制 | 区域 | 状态 | 延迟 |
|---|---|---|---|---|---|
输入: $0.30输出: $0.90 | 600 RPM / 1.0M TPM | us-east-1eu-west-1 | 正常 | 0ms |
通过 Mistral AI 使用此模型,兼容 OpenAI SDK。
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.mistral.ai/v1",
apiKey: process.env.MISTRAL_API_KEY,
});
const response = await client.chat.completions.create({
model: "codestral-2501",
messages: [
{ role: "user", content: "Hello!" }
],
});
console.log(response.choices[0].message.content);使用 Mistral AI API · 兼容 OpenAI SDK