curl --location --request POST 'https://api.qnaigc.com/bypass/openai/v1/responses' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Create Response Request",
"description": "创建模型响应的请求体参数",
"properties": {
"background": {
"type": "boolean",
"description": "是否在后台运行模型响应。"
},
"context_management": {
"type": "array",
"description": "此请求的上下文管理配置。",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "上下文管理条目类型。目前仅支持 '\''compaction'\''(压缩)。"
},
"compact_threshold": {
"type": "number",
"description": "触发此条目压缩的 Token 阈值。"
}
},
"required": [
"type"
]
}
},
"conversation": {
"anyOf": [
{
"type": "string",
"description": "对话的唯一 ID。"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "对话的唯一 ID。"
}
},
"required": [
"id"
]
}
],
"description": "该响应所属的对话。来自此对话的项目会附加到 `input_items` 前,响应完成后输入输出项目会自动加入此对话。"
},
"include": {
"type": "array",
"description": "指定要包含在模型响应中的附加输出数据。",
"items": {
"type": "string",
"enum": [
"file_search_call.results",
"web_search_call.results",
"web_search_call.action.sources",
"message.input_image.image_url",
"computer_call_output.output.image_url",
"code_interpreter_call.outputs",
"reasoning.encrypted_content",
"message.output_text.logprobs"
]
}
},
"input": {
"anyOf": [
{
"type": "string",
"description": "作为用户角色的纯文本输入。"
},
{
"type": "array",
"description": "包含不同内容类型的一个或多个输入项列表。",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"user",
"assistant",
"system",
"developer"
],
"description": "消息输入的角色。"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "内容类型,例如 '\''input_text'\'', '\''input_image'\'', '\''input_file'\'' 等。"
},
"text": {
"type": "string"
},
"image_url": {
"type": "string"
},
"file_id": {
"type": "string"
}
}
}
}
],
"description": "用于生成响应的文本、图像或音频输入。"
},
"type": {
"type": "string",
"default": "message",
"description": "输入类型,默认为 '\''message'\''。"
},
"phase": {
"type": "string",
"enum": [
"commentary",
"final_answer"
],
"description": "将助手消息标记为中间评论或最终答案(针对后续重试)。"
},
"status": {
"type": "string",
"enum": [
"in_progress",
"completed",
"incomplete"
],
"description": "项目状态。"
}
}
}
}
],
"description": "输入给模型的文本、图像或文件,用于生成响应。"
},
"instructions": {
"type": "string",
"description": "插入模型上下文的系统(或开发者)消息。当与 `previous_response_id` 一起使用时,可以轻松替换新响应的系统消息。"
},
"max_output_tokens": {
"type": "number",
"description": "响应可生成的 Token 数量上限(包括可见输出 Token 和推理 Token)。"
},
"max_tool_calls": {
"type": "number",
"description": "响应中'{
"id": "string",
"object": "response",
"created_at": 0,
"completed_at": 0,
"status": "completed",
"error": {
"code": "string",
"message": "string"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output_text": "string",
"output": [
{
"id": "string",
"type": "string",
"status": "string",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "string",
"refusal": "string"
}
],
"name": "string",
"arguments": "string",
"call_id": "string"
}
],
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"conversation": {
"id": "string"
},
"previous_response_id": "string",
"model": "string",
"instructions": "string",
"metadata": {
"property1": "string",
"property2": "string"
},
"prompt_cache_key": "string",
"prompt_cache_retention": "string",
"safety_identifier": "string",
"service_tier": "string",
"parallel_tool_calls": true,
"temperature": 0,
"top_p": 0,
"top_logprobs": 0,
"max_output_tokens": 0,
"max_tool_calls": 0,
"truncation": "string",
"user": "string",
"background": true
}