Responses格式
OpenAI Responses API,用于创建模型响应。 支持多轮对话、工具调用、推理等功能。
POST
https://api.xiexus.cn/v1/responses
请求体:必填
接口信息
方法
POST路径
/v1/responses完整地址
https://api.xiexus.cn/v1/responses请求体
必填
标签
聊天(Chat)/原生OpenAI格式
响应码
200
静态文件
当前接口页内已嵌入 OpenAPI JSON;如果需要查看总文件,可直接打开固定静态文件
relay.json。当前 JSON
../../../openapi/generated/ai-model/聊天(Chat)/原生OpenAI格式/post-v1-responses-createresponse-383826475.json总文件
../../../openapi/relay.jsonOpenAPI JSON
已将服务地址固定为
https://api.xiexus.cn,其余结构保持和源文档一致。{
"openapi": "3.1.0",
"info": {
"title": "Responses格式",
"version": "1.0.0",
"description": "OpenAI Responses API,用于创建模型响应。\n支持多轮对话、工具调用、推理等功能。\n"
},
"tags": [
{
"name": "聊天(Chat)/原生OpenAI格式"
}
],
"components": {
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "使用 Bearer Token 认证。\n格式: `Authorization: Bearer sk-xxxxxx`\n"
}
}
},
"paths": {
"/v1/responses": {
"post": {
"tags": [
"聊天(Chat)/原生OpenAI格式"
],
"summary": "Responses格式",
"description": "OpenAI Responses API,用于创建模型响应。\n支持多轮对话、工具调用、推理等功能。\n",
"operationId": "createresponse",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"model"
],
"properties": {
"model": {
"type": "string"
},
"input": {
"description": "输入内容,可以是字符串或消息数组",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"x-apifox-orders": []
}
}
]
},
"instructions": {
"type": "string"
},
"max_output_tokens": {
"type": "integer"
},
"temperature": {
"type": "number"
},
"top_p": {
"type": "number"
},
"stream": {
"type": "boolean"
},
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {},
"x-apifox-orders": []
}
},
"tool_choice": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {},
"x-apifox-orders": []
}
]
},
"reasoning": {
"type": "object",
"properties": {
"effort": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"summary": {
"type": "string"
}
},
"x-apifox-orders": [
"effort",
"summary"
]
},
"previous_response_id": {
"type": "string"
},
"truncation": {
"type": "string",
"enum": [
"auto",
"disabled"
]
}
},
"x-apifox-orders": [
"model",
"input",
"instructions",
"max_output_tokens",
"temperature",
"top_p",
"stream",
"tools",
"tool_choice",
"reasoning",
"previous_response_id",
"truncation"
]
}
}
}
},
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "成功创建响应",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string",
"examples": [
"response"
]
},
"created_at": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"completed",
"failed",
"in_progress",
"incomplete"
]
},
"model": {
"type": "string"
},
"output": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"role": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"text": {
"type": "string"
}
},
"x-apifox-orders": [
"type",
"text"
]
}
}
},
"x-apifox-orders": [
"type",
"id",
"status",
"role",
"content"
]
}
},
"usage": {
"type": "object",
"properties": {
"prompt_tokens": {
"type": "integer",
"description": "提示词 Token 数"
},
"completion_tokens": {
"type": "integer",
"description": "补全 Token 数"
},
"total_tokens": {
"type": "integer",
"description": "总 Token 数"
},
"prompt_tokens_details": {
"type": "object",
"properties": {
"cached_tokens": {
"type": "integer"
},
"text_tokens": {
"type": "integer"
},
"audio_tokens": {
"type": "integer"
},
"image_tokens": {
"type": "integer"
}
},
"x-apifox-orders": [
"cached_tokens",
"text_tokens",
"audio_tokens",
"image_tokens"
]
},
"completion_tokens_details": {
"type": "object",
"properties": {
"text_tokens": {
"type": "integer"
},
"audio_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
}
},
"x-apifox-orders": [
"text_tokens",
"audio_tokens",
"reasoning_tokens"
]
}
},
"x-apifox-orders": [
"prompt_tokens",
"completion_tokens",
"total_tokens",
"prompt_tokens_details",
"completion_tokens_details"
]
}
},
"x-apifox-orders": [
"id",
"object",
"created_at",
"status",
"model",
"output",
"usage"
]
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.xiexus.cn",
"description": "固定生产地址"
}
]
}