curl --request POST \
--url https://api.omniall.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5",
"input": "用一段话解释 Kubernetes"
}
'{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"model": "<string>",
"output": [
{
"type": "<string>",
"id": "<string>",
"status": "<string>",
"role": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
],
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "无效的令牌 (request id: ...)",
"type": "new_api_error",
"code": ""
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}Responses 对话
Omniall AI 转发的 OpenAI Responses 接口。适合新版模型、内置工具与多轮 previous_response_id。
curl --request POST \
--url https://api.omniall.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5",
"input": "用一段话解释 Kubernetes"
}
'{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"model": "<string>",
"output": [
{
"type": "<string>",
"id": "<string>",
"status": "<string>",
"role": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
],
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "无效的令牌 (request id: ...)",
"type": "new_api_error",
"code": ""
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}授权
使用来自 https://omniall.ai/dashboard 的 Authorization: Bearer sk-...
请求体
OpenAI Responses API 请求体(POST /v1/responses)。新版 OpenAI 模型与内置工具推荐使用。
模型广场中的模型 ID。
"gpt-5"
用户输入:纯字符串,或由 input_text / input_image / input_file 等组成的数组。
本次响应的系统级指令(类似 system prompt)。
模型最多可生成的 token 数。
采样温度。
核采样参数。
为 true 时通过 SSE 流式返回事件。
流式输出
内置工具(如 { "type": "web_search_preview" })和/或用于 Agent 的函数工具。
工具选择方式(auto、必选或指定工具)。
支持时允许一轮内多次工具调用。
本次响应的工具调用上限。
从先前 response id 继续(多轮无需重发完整历史)。
使用 Responses 会话状态时的 conversation 对象/id。
推理模型的推理控制。
Show child attributes
Show child attributes
文本格式配置(支持时包含结构化输出 / json_schema)。
响应载荷中需要额外包含的字段。
上下文溢出处理:auto 或 disabled。
auto, disabled 附加到响应的任意元数据。
上游是否可存储交互(视渠道设置而定)。
终端用户标识,用于滥用监控。
响应
Response 对象(流式时为 SSE 事件)。
Responses 接口
响应 id(配合 previous_response_id 使用)。
通常为 response。
"response"
Unix 时间戳。
生命周期状态:completed、failed、in_progress、incomplete。
completed, failed, in_progress, incomplete 所用模型。
输出项(消息、工具调用等)。从消息内容块读取回答文本。
Show child attributes
Show child attributes
Token 用量。
Show child attributes
Show child attributes