引言
Mistral 通过 La Plateforme 提供官方 API,其开放权重模型(open-mistral-7b、open-mixtral-8x7b、open-mixtral-8x22b)有免费速率配额,适合轻量对话与原型。模型以体积小、推理快、指令遵循稳著称。
端点与模型
端点:https://api.mistral.ai/v1/chat/completions。
open-mistral-7b — 7B 对话,免费。
open-mixtral-8x7b — MoE,性价比高。
open-mixtral-8x22b — 更大 MoE。
mistral-small-latest — 商用小模型,有免费配额。
mistral-large-latest — 旗舰,仅付费。
调用示例
from mistralai import Mistral
client = Mistral(api_key="...")
resp = client.chat.complete(
model="open-mistral-7b",
messages=[{"role": "user", "content": "把这段话翻译成英文:今天天气很好"}])
print(resp.choices[0].message.content)
注意事项
免费层约 1 RPM、500K TPM(以控制台为准)。La Plateforme 免费策略随商业节奏调整。Mistral 还提供 function calling、JSON mode、agents,免费层均可体验。生产用 mistral-small-latest 控成本。
Introduction
Mistral's official API on La Plateforme exposes open-weight models (open-mistral-7b, open-mixtral-8x7b, open-mixtral-8x22b) with a free rate quota. The models are known for being compact, fast, and reliable at instruction following, which makes them a strong fit for light chat, prototyping, and edge deployment. The Mixtral Mixture-of-Experts architecture is particularly cost-effective: it routes each token through a small subset of experts, delivering large-model quality at small-model latency, which is a favorable trade for cost-sensitive workloads. Mistral also publishes function-calling and JSON-mode support across its open models, which is uncommon in the free tier of most providers. This means you can build structured-output prototypes — extraction, classification, tool use — on the free quota without sacrificing the reliability that structured outputs provide, which is often the deciding factor when choosing a model for agent workflows.
Endpoint and Models
Endpoint: https://api.mistral.ai/v1/chat/completions (OpenAI-compatible, so the OpenAI SDK works with a base_url swap).
open-mistral-7b — 7B dense chat model, free.
open-mixtral-8x7b — MoE, strong price/performance for multilingual tasks.
open-mixtral-8x22b — larger MoE, higher quality on reasoning.
mistral-small-latest — commercial small model with a free quota.
mistral-large-latest — flagship, paid only.
Call Example
from mistralai import Mistral
client = Mistral(api_key="...")
resp = client.chat.complete(
model="open-mistral-7b",
messages=[{"role": "user", "content": "Translate to English: The weather is nice today."}],
)
print(resp.choices[0].message.content)
Caveats
The free tier allows roughly 1 RPM and 500K TPM (verify on the console). That 1 RPM limit is the binding constraint — it effectively rules out any interactive use and confines the free tier to batch or evaluation workloads where you fire one request, wait, and fire the next. La Plateforme's free policy shifts with the business roadmap, so watch the official changelog before building anything that depends on the free quota long-term. Mistral also offers function calling, JSON mode, and agents, all usable on the free tier for prototyping. For production, switch to paid billing and lean on mistral-small-latest for high-frequency tasks to control cost while retaining quality. One more practical point: Mistral's European hosting is a genuine advantage for GDPR-bound workloads, since data never leaves EU jurisdiction. Few free-tier providers can make that claim, and for any application touching EU personal data, this jurisdictional property may matter more than raw model quality. Document it as a compliance feature, not just an incidental detail, when you choose Mistral for a regulated prototype. The 1 RPM free limit is also a useful forcing function: it disciplines you to batch and cache, habits that pay off disproportionately once you move to paid tiers where unbatched traffic becomes expensive.