🎉 MiniMax-M2.7 全新发布!订阅 Token Plan,尽享全模态模型。立即体验 ➔
curl --request POST \
--url https://api.minimaxi.com/anthropic/v1/messages \
--header 'Content-Type: <content-type>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"model": "MiniMax-M2.7",
"messages": [
{
"role": "user",
"content": "你好"
}
]
}
'{
"id": "06379dbe27b33d7c58d8410a8efe6394",
"type": "message",
"role": "assistant",
"model": "MiniMax-M2.7",
"content": [
{
"thinking": "用户用中文说\"你好\",这是一个简单的问候。我应该用中文友好地回应。",
"signature": "ce704495524bad054531fe187e18b4a8d874a52fbb3923ce18fceace5e768ec9",
"type": "thinking"
},
{
"text": "你好!有什么我可以帮助你的吗?",
"type": "text"
}
],
"usage": {
"input_tokens": 42,
"output_tokens": 30
},
"stop_reason": "end_turn",
"base_resp": {
"status_code": 0,
"status_msg": ""
}
}使用 Anthropic API 兼容格式接口调用 MiniMax 模型,支持角色扮演、多轮对话等对话场景。支持丰富的角色设定(system、user_system、group 等)和示例对话学习。
curl --request POST \
--url https://api.minimaxi.com/anthropic/v1/messages \
--header 'Content-Type: <content-type>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"model": "MiniMax-M2.7",
"messages": [
{
"role": "user",
"content": "你好"
}
]
}
'{
"id": "06379dbe27b33d7c58d8410a8efe6394",
"type": "message",
"role": "assistant",
"model": "MiniMax-M2.7",
"content": [
{
"thinking": "用户用中文说\"你好\",这是一个简单的问候。我应该用中文友好地回应。",
"signature": "ce704495524bad054531fe187e18b4a8d874a52fbb3923ce18fceace5e768ec9",
"type": "thinking"
},
{
"text": "你好!有什么我可以帮助你的吗?",
"type": "text"
}
],
"usage": {
"input_tokens": 42,
"output_tokens": 30
},
"stop_reason": "end_turn",
"base_resp": {
"status_code": 0,
"status_msg": ""
}
}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 包含对话历史的消息列表
Show child attributes
设定模型的角色和行为
是否使用流式传输,默认为 false。设置为 true 后,响应将分批返回
指定生成内容长度的上限(Token 数),上限为 204800。超过上限的内容会被截断。如果生成因 length 原因中断,请尝试调高此值
x >= 1温度系数,影响输出随机性,取值范围 (0, 1],MiniMax-M2.7 模型默认值为 1.0。值越高,输出越随机;值越低,输出越确定
0 < x <= 1采样策略,影响输出随机性,取值范围 (0, 1],MiniMax-M2.7 模型默认值为 0.95
0 < x <= 1本次响应的唯一 ID
对象类型,固定为 message
message 角色,固定为 assistant
assistant 本次请求使用的模型 ID
响应内容块列表
Show child attributes
生成停止的原因:
end_turn: 模型自然结束max_tokens: 达到 max_tokens 上限stop_sequence: 命中停止序列end_turn, max_tokens, stop_sequence 本次请求的 Token 使用情况
Show child attributes
错误状态码和详情
Show child attributes
此页面对您有帮助吗?