curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M4",
"messages": [
{
"role": "user",
"content": "Please introduce yourself in one sentence."
}
]
}
'
{
"id": "example_c425f5",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "0.05",
"role": "assistant",
"name": "MiniMax AI",
"reasoning_content": "Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05."
}
}
],
"created": 1792401901,
"model": "MiniMax-M3.1-Flash",
"object": "chat.completion",
"usage": {
"total_tokens": 281,
"total_characters": 0,
"prompt_tokens": 229,
"completion_tokens": 52,
"completion_tokens_details": {
"reasoning_tokens": 49
},
"prompt_tokens_details": {
"cached_tokens": 187
}
}
}
Chat Completions 接口
MiniMax 全模型接口 - Chat Completions 快速开始
- 使用 OpenAI Chat Completions 协议调用 MiniMax 系列模型,通过
model参数选择具体型号 - 最少只需
model与messages两个参数 - 全系列默认思考,思考 token 计入输出并按输出价计费
- 需要流式输出、工具调用、思考深度调节、图像与视频输入等能力,请查看「完整参数」页
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M4",
"messages": [
{
"role": "user",
"content": "Please introduce yourself in one sentence."
}
]
}
'
{
"id": "example_c425f5",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "0.05",
"role": "assistant",
"name": "MiniMax AI",
"reasoning_content": "Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05."
}
}
],
"created": 1792401901,
"model": "MiniMax-M3.1-Flash",
"object": "chat.completion",
"usage": {
"total_tokens": 281,
"total_characters": 0,
"prompt_tokens": 229,
"completion_tokens": 52,
"completion_tokens_details": {
"reasoning_tokens": 49
},
"prompt_tokens_details": {
"cached_tokens": 187
}
}
}
BaseURL 说明:默认 BaseURL 为
https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。MiniMax 系列默认思考,思考内容通过
reasoning_content 返回,思考 token 计入输出并按输出价计费。MiniMax-M3 默认把思考内容以 <think>...</think> 放在 content 开头,需要分开时请设置 reasoning_split: true,详见完整参数。授权
所有接口均需要使用 Bearer Token 进行认证
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
要调用的模型:
| 模型 ID | 说明 |
|---|---|
MiniMax-M4 | 最新一代模型,支持图像与视频输入;1M 上下文,最大输出 262,144 tokens |
MiniMax-M3.1-Flash | 支持图像与视频输入;1M 上下文,最大输出 524,288 tokens |
MiniMax-M3 | 支持图像与视频输入;1M 上下文,最大输出 524,288 tokens |
MiniMax-M2.5 | 仅文本;204,800 上下文,最大输出 32,768 tokens |
可用选项:
MiniMax-M4, MiniMax-M3.1-Flash, MiniMax-M3, MiniMax-M2.5 示例:
"MiniMax-M4"