ONE-APIにアクセスし、ステージングサービスの負荷として複数のアカウントを申請しないでください!一方は非倫理的であり、もう一方はブロックされます。
MistralAIは、APIの無料パッケージを立ち上げた数日されている、理由を送信するかどうかを感じることを躊躇しているMistralは、開発者を欺くために何度もされていることです...8月の終わりにもともと9月が使用することはできません計画に加入していないことを言った、結果は9月17日に直接モデルのほとんどが無料で開いていることです。
直接https://console.mistral.ai/、請求ページを開いてください。
無料プランに参加するには、まず電話で認証を受ける必要がある。グーグル・バーチャル・ナンバーを使えば、国内の携帯電話番号も入力可能だが、私は試していない。

半日かけて無料パッケージの制限を探したが見つからず、ようやく以下のような使用可能なモデルタイプの制限についての記述を見つけた:
Mistral 無料モデルとプレミアムモデルの2種類がある。
上級モデル
| 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はペナルティ・パラメータをサポートしていないので、ワーカーにブロックしてもらうことができる。

フィールドワーカーのスクリプトは、ミストラルフィルタリング(クロスドメイン処理の更新コルス)ではサポートされていません:
/**
* 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
});
}
フリーコードモデルを使用するには、別途キーが必要です。

低価格で性能の良いモデル(DeepSeek)や、大規模モデル用の無料API(Wisdom Spectrum)なども数多くあるが、無料モデルはその中から選ぶべきだろう。
MistralはCodestralという特殊なコードモデルを持っており、上記の内容が紹介されていますが、LMSYSのランキングはかなり高く、カーソルにアクセスしてみて使用感はまあまあです。





































