微信扫码
添加专属顾问
我要投稿
MistralAI推出API免费套餐已有几天,一直犹豫不觉是否发出来的原因是Mistral已经多次忽悠开发者...8月底本来说9月不订阅计划就用不了,结果在9月17日直接将大部分模型免费开放。
直接访问 https://console.mistral.ai/ ,进入计费页面开通。
加入免费计划首先要通过电话验证,这里我已经认证过了。使用谷歌虚拟号码,国内手机号也支持输入,不过我没有试。
找半天免费套餐有什么限制,也没找到,最后只看到一份可使用的模型型号限制说明,如下:
Mistral 提供两种类型的模型:免费模型和高级模型。
| Model | Weight availability | Available via API | Description | Max Tokens | API Endpoints | Version |
|---|---|---|---|---|---|---|
| Mistral Large | ✔️ Mistral Research License | ✔️ | Our top-tier reasoning model for high-complexity tasks with the lastest version v2 released July 2024. Learn more on our blog post | 128k | mistral-large-latest | 24.07 |
| Mistral Small | ✔️ Mistral Research License | ✔️ | Our latest enterprise-grade small model with the lastest version v2 released September 2024. Learn more on our blog post | 32k | mistral-small-latest | 24.09 |
| Codestral | ✔️ Mistral Non-Production License | ✔️ | Our cutting-edge language model for coding released May 2024 | 32k | codestral-latest | 24.05 |
| Mistral Embed | ✔️ | Our state-of-the-art semantic for extracting representation of text extracts | 8k | mistral-embed | 23.12 |
最新模型
| Model | Weight availability | Available via API | Description | Max Tokens | API Endpoints | Version |
|---|---|---|---|---|---|---|
| Pixtral | ✔️ Apache2 | ✔️ | A 12B model with image understanding capabilities in addition to text. Learn more on our blog post | 128k | pixtral-12b-2409 | 24.09 |
| ||||||
| Model | Weight availability | Available via API | Description | Max Tokens | API Endpoints | Version |
| --- | --- | --- | --- | --- | --- | --- |
| Mistral Nemo | ✔️ Apache2 | ✔️ | Our best multilingual open source model released July 2024. Learn more on our blog post | 128k | open-mistral-nemo | 24.07 |
| Codestral Mamba | ✔️ Apache2 | ✔️ | Our first mamba 2 open source model released July 2024. Learn more on our blog post | 256k | open-codestral-mamba | v0.1 |
| Mathstral | ✔️ Apache2 | Our first math open source model released July 2024. Learn more on our blog post | 32k | NA | v0.1 | |
| ||||||
| Model | Weight availability | Available via API | Description | Max Tokens | API Endpoints | Version |
| --- | --- | --- | --- | --- | --- | --- |
| Mistral 7B | ✔️ Apache2 | ✔️ | Our first dense model released September 2023. Learn more on our blog post | 32k | open-mistral-7b | v0.3 |
| Mixtral 8x7B | ✔️ Apache2 | ✔️ | Our first sparse mixture-of-experts released December 2023. Learn more on our blog post | 32k | open-mixtral-8x7b | v0.1 |
| Mixtral 8x22B | ✔️ Apache2 | ✔️ | Our best open source model to date released April 2024. Learn more on our blog post | 64k | open-mixtral-8x22b | v0.1 |
看来免费的都可以用,请求地址格式:https://api.mistral.ai/v1/chat/completions
然后直接创建密钥即可使用:
注意:他们家 api 不支持惩罚参数,可以搞个 worker 屏蔽掉,否则在很多终端中可能异常。
mistral 过滤不支持字段 worker 脚本(更新 cors 跨域处理):
/**Welcome to Cloudflare Workers! This is your first worker. *Run "npm run dev" in your terminal to start a development serverOpen a browser tab at http://localhost:8787/ to see your worker in actionRun "npm run deploy" to publish your worker *Learn more at https://developers.cloudflare.com/workers/ */export default {async fetch(request, env) {// 处理预检请求if (request.method === 'OPTIONS') {return handleOptions(request);}const url = new URL(request.url);url.host = 'api.mistral.ai';let body;try {// 获取 body 数据并解析为 JSONbody = await request.json();} catch (error) {return new Response('Invalid JSON', { status: 400 });}// 定义支持字段列表const allowedFields = ['model', 'messages', 'temperature', 'topp', 'maxtokens', 'mintokens', 'stream', 'stop', 'randomseed','responseformat','tools','toolchoice','safe_prompt'];// 过滤 body 中不在支持字段列表中的字段const filteredBody = filterFields(body, allowedFields);const newBody = JSON.stringify(filteredBody);const modifiedRequest = new Request(url, {method: request.method,body: newBody,headers: request.headers});return fetch(modifiedRequest);}}// 过滤不支持参数function filterFields(obj, allowedFields) {let result = {};for (const key in obj) {if (allowedFields.includes(key)) {result[key] = obj[key];}}return result;}// 处理预检请求的函数function handleOptions(request) {const headers = {'Access-Control-Allow-Origin': '*', // 允许所有来源'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', // 允许的方法'Access-Control-Allow-Headers': 'Content-Type, Authorization', // 允许的头部'Access-Control-Max-Age': '86400', // 预检请求的缓存时间(秒)};return new Response(null, {status: 204,headers: headers});}
免费的代码模型需要单独申请密钥使用
虽然目前国内有很多价格及低、性能也不错的模型(DeepSeek),甚至也有免费的大模型API(智谱清言)但免费也要优中选优嘛。
Mistral有专精代码的模型Codestral,上面内容已经介绍,LMSYS 排名挺高,可以接入到Cursor试试,用起来感觉还行。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2025-11-04
百灵大模型 Ling 和 Ring 系列首发支持 SGLang-JAX 推理引擎
2025-11-04
首个国产开源AI原生后端,不再写后端,AI就是全栈工程师。
2025-11-04
DeepCode: 用多智能体架构重新定义代码生成
2025-11-04
AI Infra:POINTS-Reader,腾讯开源的文档解析和OCR工具
2025-11-03
震惊,Github开源,真正让程序员效率提升 90%的AI辅助工具来啦!!!
2025-11-03
Dify迎来最强开源对手!这个本地Agent内置微调+超细权限控制~
2025-11-03
我们大胆做了个决定,大会所有音乐bgm由AI生成,这部分预算可以省了!|Jinqiu Scan
2025-11-03
LongCat-Flash-Omni 正式发布并开源:开启全模态实时交互时代
2025-08-20
2025-09-07
2025-08-20
2025-08-26
2025-08-22
2025-09-06
2025-10-20
2025-08-22
2025-09-08
2025-08-12
2025-11-03
2025-10-29
2025-10-28
2025-10-13
2025-09-29
2025-09-17
2025-09-09
2025-09-08