Mistral AI
Mistral API——欧洲模型,免单独注册。
mistral-large、mistral-small、codestral、mixtral——快速、许可证友好的欧洲大模型,统一 OpenAI 兼容接口。
最新模型 截至 2026-05-23
查看全部模型 →mistral-medium-2-latest balanced Production sweet spot. Lower cost than Large with similar capability for most tasks.
codestral-2-latest specialized Code-specialized model with strong fill-in-the-middle. Used in many IDE integrations.
mistral-large-2-latest flagship Mistral's top closed-weight model. EU-hosted option available for GDPR-strict workloads.
为什么用 JJAPI 调这家 API
欧盟数据驻留可选
GDPR 敏感的负载可以路由到 Mistral 巴黎机房,请求不出欧盟。
FIM 代码补全
Codestral 支持中间填充,IDE 集成(Continue、Cody)的完美选择。
宽松许可证
Mixtral 系列是 Apache-2.0,可商用、可自建。
OpenAI 兼容
可直接替换 Mistral 官方 API,速率限制更宽松。
example.py
from openai import OpenAI
client = OpenAI(
base_url="https://api.jjapi.net/v1",
api_key="sk-jjapi-...",
)
r = client.chat.completions.create(
model="mistral-medium-2-latest", # current as of 2026-05-23
messages=[{"role": "user", "content": "Hi"}],
)
print(r.choices[0].message.content) 常见问题
GDPR 严格场景能用吗?
可以——控制台开启 EU-only 路由后,请求只会落到 Mistral 巴黎基础设施。
codestral 支持 FIM 吗?
支持——向 /v1/completions 传 'prompt' 和 'suffix' 参数,codestral 会填补中间。适合 IDE 风格的自动补全。
mistral-large 和 mixtral 的区别?
mistral-large 是闭源最强模型。mixtral-8x22b 是开源 Apache-2.0 MoE,能力略弱但可商用自建。