curl --request POST \
--url https://apiany.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.5",
"input": "审核这个 API 设计并列出主要风险。",
"reasoning": {
"effort": "high",
"summary": "auto"
},
"text": {
"verbosity": "medium"
}
}
'{
"id": "<string>",
"object": "response",
"status": "<string>",
"model": "<string>",
"output": [
{}
],
"created_at": 123,
"output_text": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}创建 Responses 响应
兼容 OpenAI Responses 的接口。支持 Responses 原生 input、reasoning 控制、web search 等内置工具,以及 stream=true 时的官方 Responses SSE。
curl --request POST \
--url https://apiany.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.5",
"input": "审核这个 API 设计并列出主要风险。",
"reasoning": {
"effort": "high",
"summary": "auto"
},
"text": {
"verbosity": "medium"
}
}
'{
"id": "<string>",
"object": "response",
"status": "<string>",
"model": "<string>",
"output": [
{}
],
"created_at": 123,
"output_text": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
"gpt-5.5"
Responses 输入。可以是字符串,也可以是 message / tool-result item 数组。
系统或开发者指令。
思考与最终答案共用的最大 token 数。上限因模型而异;预算耗尽时答案可能不完整。
x >= 10 <= x <= 20 <= x <= 1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Responses tools,包含 function tools 和 web_search_preview 等内置工具。
为 true 时返回 OpenAI Responses SSE 事件。
reasoning.effort 的兼容别名。同时提供两种 effort 写法时,值必须一致;冲突返回 400。 思考强度。此枚举仅表示语法允许值,不代表每个模型均支持。模型不支持的值返回 400。Kimi K3 支持 low、high、max(默认 max);GPT-5.4/5.5 支持 none、low、medium、high、xhigh。Claude 与 Gemini 限制见 /zh/models/chat-models。省略时保持模型默认行为。模型级可用档位、默认档位与能否关闭思考都发布在 GET /v1/models 的 capability_metadata.reasoning 中。
none, minimal, low, medium, high, xhigh, max