Don't deploy big models locally, Mistral is launching a free API package for developers with direct domestic connectivity!

AI News8mos agorelease Sharenet.ai
1.1K 0
Trae

Do not access ONE-API and apply for multiple accounts as a staging service load! One is unethical and the other is blocked.

 

MistralAI launched the API free package has been a few days, has been hesitant to send out the reason is that Mistral has repeatedly fooled developers.... ...At the end of August it was originally said that it would not be available if you did not subscribe to the plan in September, but it turned out that most of the models were directly made available for free on September 17th.

 

Go directly to https://console.mistral.ai/ and go to the billing page to open it.

To join the free program you first have to be verified by phone, which I've done here. Using Google Virtual Number, domestic cell phone numbers are also supported for input, but I didn't try it.

不要在本地部署大模型了,Mistral为开发者推出免费API套餐,国内可直连!

 

After half a day of searching for any restrictions on the free package, I couldn't find any, and I finally came across a description of the limitations on the model types that can be used, as follows:

Mistral Two types of models are offered: free models and premium models.

Advanced Models

ModelWeight availabilityAvailable via APIDescriptionMax. TokensAPI EndpointsVersion
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 post128kmistral-large-latest24.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 post32kmistral-small-latest24.09
Codestral✔️
Mistral Non-Production License
✔️Our cutting-edge language model for coding released May 202432kcodestral-latest24.05
Mistral Embed✔️Our state-of-the-art semantic for extracting representation of text extracts8kmistral-embed23.12

Free Models

  • Latest Models
ModelWeight availabilityAvailable via APIDescriptionMax TokensAPI EndpointsVersion
Pixtral✔️
Apache2
✔️A 12B model with image understanding capabilities in addition to text. Learn more on our blog post128kpixtral-12b-240924.09
  • test model
ModelWeight availabilityAvailable via APIDescriptionMax TokensAPI EndpointsVersion
Mistral Nemo✔️
Apache2
✔️Our best multilingual open source model released July 2024. Learn more on our blog post128kopen-mistral-nemo24.07
Codestral Mamba✔️
Apache2
✔️Our first mamba 2 open source model released July 2024. Learn more on our blog post256kopen-codestral-mambav0.1
Mathstral✔️
Apache2
Our first math open source model released July 2024. Learn more on our blog post32kNAv0.1
  • outdated model
ModelWeight availabilityAvailable via APIDescriptionMax TokensAPI EndpointsVersion
Mistral 7B✔️
Apache2
✔️Our first dense model released September 2023. Learn more on our blog post32kopen-mistral-7bv0.3
Mixtral 8x7B✔️
Apache2
✔️Our first sparse mixture-of-experts released December 2023. Learn more on our blog post32kopen-mixtral-8x7bv0.1
Mixtral 8x22B✔️
Apache2
✔️Our best open source model to date released April 2024. Learn more on our blog post64kopen-mixtral-8x22bv0.1

 

It looks like free ones are available, request address format: https://api.mistral.ai/v1/chat/completions

Then just create the key and use it:

不要在本地部署大模型了,Mistral为开发者推出免费API套餐,国内可直连!

 

Note: Their api doesn't support the penalty parameter, you can get a worker to block it, otherwise it may be abnormal in many terminals.

不要在本地部署大模型了,Mistral为开发者推出免费API套餐,国内可直连!

 

Field worker scripts are not supported by mistral filtering (update cors cross-domain processing):

/**
* Welcome to Cloudflare Workers! This is your first worker.
*
* - Run "npm run dev" in your terminal to start a development server
* - Open a browser tab at http://localhost:8787/ to see your worker in action
* - Run "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 数据并解析为 JSON
body = await request.json();
} catch (error) {
return new Response('Invalid JSON', { status: 400 });
}

// 定义支持字段列表
const allowedFields = ['model', 'messages', 'temperature', 'top_p', 'max_tokens', 'min_tokens', 'stream', 'stop', 'random_seed','response_format','tools','tool_choice','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
});
}

 

The free code model requires a separate key to use

不要在本地部署大模型了,Mistral为开发者推出免费API套餐,国内可直连!

 

Although there are a lot of domestic price and low, good performance model (DeepSeek), and even a free big model API (Smart Spectrum), but the free should also be the best of the best.

Mistral has a specialized code model Codestral, the above content has been introduced, LMSYS ranking is quite high, you can access to Cursor try, use the feeling is okay.

不要在本地部署大模型了,Mistral为开发者推出免费API套餐,国内可直连!
© Copyright notes
AiPPT

Related posts

No comments

none
No comments...