跳转到主要内容
POST
/
v1
/
responses
curl --request POST \
  --url https://api.minimaxi.com/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "model": "MiniMax-M3",
  "input": "你好!"
}
'
{
  "id": "abc123",
  "object": "response",
  "created_at": 1764000000,
  "model": "MiniMax-M3",
  "status": "completed",
  "output": [
    {
      "id": "abc123_msg",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "你好!我是 MiniMax,请问有什么可以帮你的?",
          "annotations": []
        }
      ]
    }
  ],
  "output_text": "你好!我是 MiniMax,请问有什么可以帮你的?",
  "usage": {
    "input_tokens": 8,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 18,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 26
  },
  "parallel_tool_calls": true,
  "store": false,
  "truncation": "disabled"
}

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.

授权

Authorization
string
header
必填

HTTP: Bearer Auth

  • Security Scheme Type: http
  • HTTP Authorization Scheme: Bearer API_key,用于验证账户信息,可在 账户管理>接口密钥 中查看

请求头

Content-Type
enum<string>
默认值:application/json
必填

请求体的媒介类型,请设置为 application/json,确保请求数据的格式为 JSON

可用选项:
application/json

请求体

application/json
model
string
必填

调用的模型名称,如 MiniMax-M3

示例:

"MiniMax-M3"

input
必填

对话内容,支持简单文本或完整对话历史数组

instructions
string

系统指令

max_output_tokens
integer

最大输出 token 数

temperature
number<float>
默认值:1

采样温度,取值范围 (0, 1]

必填范围: 0 <= x <= 1
top_p
number<float>
默认值:0.95

核采样,取值范围 (0, 1]

必填范围: 0 <= x <= 1
stream
boolean
默认值:false

设置为 true 启用 SSE 流式响应

tools
object[]

工具列表

tool_choice
enum<string>

工具选择策略:none 表示不调用任何工具;auto 表示由模型自动判断是否调用工具

可用选项:
none,
auto
metadata
object

请求元数据,key-value 均为字符串

prompt_cache_key
string

Prompt 缓存路由标识

text
object

输出格式控制

reasoning
object

思考强度控制。不传则采用 adaptive 模式(由模型自动判断)

响应

200 - application/json

成功响应

id
string
必填

响应 ID

示例:

"abc123"

object
enum<string>
必填

对象类型,固定为 response

可用选项:
response
created_at
integer
必填

响应创建时间(Unix 秒)

model
string
必填

实际处理请求的模型名称

status
enum<string>
必填

响应状态

可用选项:
completed,
incomplete,
failed
output
(Message · object | Reasoning · object | Function Call · object)[]
必填

模型输出列表

助手回复

output_text
string | null

便利字段,所有文本输出拼接后的结果

usage
object
error
object

错误信息,仅在 status=failed 时返回

incomplete_details
object

未完成原因,仅在 status=incomplete 时返回

parallel_tool_calls
boolean

是否支持并行工具调用

store
boolean

响应是否持久化

truncation
enum<string>

上下文截断策略

可用选项:
disabled