Codestral 2508
Mistral's cutting-edge language model for coding released end of July 2025. Codestral specializes in low-latency, high-frequency tasks such as fill-in-the-middle (FIM), code correction and test generation. [Blog Post](https://mistral.ai/news/codestral-25-08)
Mistral: Codestral 2508 在 NextModel 中是什么?
Mistral: Codestral 2508 是 NextModel 目录中的 OpenRouter 模型,常用于 General chat via OpenRouter、API workloads 工作负载。当前展示价格为输入 $0.058 / 1M tokens、输出 $0.169 / 1M tokens 每 100 万 token,上下文窗口为 256k token。
适用场景
- General chat via OpenRouter
- API workloads
OpenAI 兼容调用示例
保持 OpenAI SDK 调用方式不变,把 base_url 改为 NextModel,并使用模型目录 ID mistralai--codestral-2508。
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.nextmodel.app/v1"
)
resp = client.chat.completions.create(
model="mistralai/codestral-2508",
messages=[{"role": "user", "content": "Hello from NextModel"}]
)
print(resp.choices[0].message.content)相似替代项
This model always redirects to the latest model in the Claude Fable family.
This model always redirects to the latest model in the Anthropic Claude Haiku family.
This model always redirects to the latest model in the Claude Opus family.
对比 Mistral: Codestral 2508
常见问题