🎉 MiniMax-M2.7 全新发布!订阅 Token Plan,尽享全模态模型。立即体验 ➔
curl --request POST \
--url https://api.minimaxi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-M2.7",
"messages": [
{
"role": "system",
"name": "MiniMax AI"
},
{
"role": "user",
"name": "用户",
"content": "你好"
}
]
}
'{
"id": "06379b8377842dc0108975f159dc3e7c",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "<think>用户用中文打招呼,我应该用中文回应。</think>\n\n你好!有什么我可以帮助你的吗?",
"role": "assistant"
}
}
],
"created": 1776838788,
"model": "MiniMax-M2.7",
"object": "chat.completion",
"usage": {
"total_tokens": 43,
"total_characters": 0,
"prompt_tokens": 22,
"completion_tokens": 21,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"input_sensitive": false,
"output_sensitive": false,
"input_sensitive_type": 0,
"output_sensitive_type": 0,
"output_sensitive_int": 0,
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}使用 OpenAI API 兼容格式接口调用 MiniMax 模型,支持角色扮演、多轮对话等对话场景。支持丰富的角色设定(system、user_system、group 等)和示例对话学习。
curl --request POST \
--url https://api.minimaxi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-M2.7",
"messages": [
{
"role": "system",
"name": "MiniMax AI"
},
{
"role": "user",
"name": "用户",
"content": "你好"
}
]
}
'{
"id": "06379b8377842dc0108975f159dc3e7c",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "<think>用户用中文打招呼,我应该用中文回应。</think>\n\n你好!有什么我可以帮助你的吗?",
"role": "assistant"
}
}
],
"created": 1776838788,
"model": "MiniMax-M2.7",
"object": "chat.completion",
"usage": {
"total_tokens": 43,
"total_characters": 0,
"prompt_tokens": 22,
"completion_tokens": 21,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"input_sensitive": false,
"output_sensitive": false,
"input_sensitive_type": 0,
"output_sensitive_type": 0,
"output_sensitive_int": 0,
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Documentation Index
Fetch the complete documentation index at: https://platform.minimaxi.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
请求体的媒介类型,请设置为 application/json,确保请求数据的格式为 JSON
application/json 模型 ID
MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.1 是否使用流式传输,默认为 false。设置为 true 后,响应将分批返回
指定生成内容长度的上限(Token 数),上限为 2048。超过上限的内容会被截断。如果生成因 length 原因中断,请尝试调高此值
x >= 1温度系数,影响输出随机性,取值范围 (0, 1],模型默认值为 1.0。值越高,输出越随机;值越低,输出越确定
0 < x <= 1采样策略,影响输出随机性,取值范围 (0, 1],模型默认值为 0.95
0 < x <= 1本次响应的唯一 ID
响应选择列表
Show child attributes
响应创建的 Unix 时间戳(秒)
本次请求使用的模型 ID
对象类型。非流式为 chat.completion,流式为 chat.completion.chunk
chat.completion, chat.completion.chunk 本次请求的 Token 使用情况统计
Show child attributes
输入内容是否命中敏感词。如果输入内容严重违规,接口会返回内容违规错误信息,回复内容为空
输入命中敏感词类型,当input_sensitive为true时返回。取值为以下其一:1 严重违规;2 色情;3 广告;4 违禁;5 谩骂;6 暴恐;7 其他
输出内容是否命中敏感词。如果输出内容严重违规,接口会返回内容违规错误信息,回复内容为空
输出命中敏感词类型
错误状态码和详情
Show child attributes
此页面对您有帮助吗?