reasoning 对象(effort、summary、context、mode;generate_summary 已弃用)、用量和缓存控制。output 是异构有序项目数组,不应假定第一项就是文本;最终文本应从 message 项的 output_text 内容读取。choices[].message 解析。并非每个模型或渠道都支持全部字段。Authorization: Bearer ********************{
"model": "gpt-5.4",
"input": "比较两个方案并给出结论",
"reasoning": {
"effort": "medium",
"summary": "auto",
"context": "auto",
"mode": "standard"
},
"max_output_tokens": 1024,
"store": false,
"stream": false
}curl --location 'https://api.nicerouter.com/v1/responses' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.4",
"input": "比较两个方案并给出结论",
"reasoning": {
"effort": "medium",
"summary": "auto",
"context": "auto",
"mode": "standard"
},
"max_output_tokens": 1024,
"store": false,
"stream": false
}'output 为异构有序项目数组;可能包含 reasoning、message、function_call、web_search_call 等。{
"id": "resp_example",
"object": "response",
"created_at": 1760000000,
"status": "completed",
"model": "gpt-5.4",
"output": [
{
"id": "rs_example",
"type": "reasoning",
"summary": [
{
"type": "summary_text",
"text": "比较了成本与可靠性。"
}
]
},
{
"id": "msg_example",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "建议选择方案 A。",
"annotations": []
}
]
}
],
"parallel_tool_calls": true,
"tool_choice": "auto",
"tools": [],
"usage": {
"input_tokens": 18,
"output_tokens": 52,
"output_tokens_details": {
"reasoning_tokens": 32
},
"total_tokens": 70
}
}