curl --request POST \
--url https://api.tikway.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.6-sol",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Write a short bedtime story about a unicorn."
}
]
}
]
}
'{
"background": false,
"completed_at": 1788668639,
"created_at": 1788668638,
"error": null,
"frequency_penalty": 0,
"id": "resp_074472f9988a119f006a9ceade27888194add2283781e99db5::Q_Olg6GjTjN-VysDZS83LBWBO3NVTBTLcLGOvp0PrBP_XWO97d8Yq9ztZQZONcJzIV1Cug",
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"metadata": {},
"model": "gpt-5.6-sol",
"object": "response",
"output": [
{
"content": [
{
"annotations": [],
"logprobs": [],
"text": "Hello! How can I help?",
"type": "output_text"
}
],
"id": "msg_074472f9988a119f006a9ceadecd488194a8a5c2f9f4c1d83e",
"phase": "final_answer",
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": "24h",
"reasoning": {
"context": "all_turns",
"effort": "medium",
"mode": "standard",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"status": "completed",
"temperature": 1,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "disabled",
"usage": {
"input_tokens": 7,
"input_tokens_details": {
"cache_write_tokens": 0,
"cached_read_tokens": 0,
"cached_tokens": 0,
"cached_write_tokens": 0
},
"output_tokens": 11,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 18
}
}Responses
curl --request POST \
--url https://api.tikway.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.6-sol",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Write a short bedtime story about a unicorn."
}
]
}
]
}
'{
"background": false,
"completed_at": 1788668639,
"created_at": 1788668638,
"error": null,
"frequency_penalty": 0,
"id": "resp_074472f9988a119f006a9ceade27888194add2283781e99db5::Q_Olg6GjTjN-VysDZS83LBWBO3NVTBTLcLGOvp0PrBP_XWO97d8Yq9ztZQZONcJzIV1Cug",
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"metadata": {},
"model": "gpt-5.6-sol",
"object": "response",
"output": [
{
"content": [
{
"annotations": [],
"logprobs": [],
"text": "Hello! How can I help?",
"type": "output_text"
}
],
"id": "msg_074472f9988a119f006a9ceadecd488194a8a5c2f9f4c1d83e",
"phase": "final_answer",
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": "24h",
"reasoning": {
"context": "all_turns",
"effort": "medium",
"mode": "standard",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"status": "completed",
"temperature": 1,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "disabled",
"usage": {
"input_tokens": 7,
"input_tokens_details": {
"cache_write_tokens": 0,
"cached_read_tokens": 0,
"cached_tokens": 0,
"cached_write_tokens": 0
},
"output_tokens": 11,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 18
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
用于生成响应的模型 ID,例如 gpt-5.6-sol。
提供给模型的文本、图片、音频或文件输入。可直接为字符串,或为输入消息数组。
插入模型上下文的系统或开发者指令。使用 previous_response_id 时,前一响应的 instructions 不会自动继承。
上一条 Response 的唯一 ID,用于多轮对话;不能与 conversation 同时使用。
本次响应所属的会话。会话项会自动加入本次上下文,输入和输出项也会写入该会话。
是否在后台运行模型响应。
指定需要额外包含在响应中的数据。
web_search_call.action.sources, code_interpreter_call.outputs, computer_call_output.output.image_url, file_search_call.results, message.input_image.image_url, message.output_text.logprobs, reasoning.encrypted_content 生成响应允许使用的最大词元数,包含可见输出和推理词元。
x >= 1响应中可处理的内置工具调用总次数上限。
x >= 0对请求输入和生成输出执行审核的配置。
Hide child attributes
Hide child attributes
审核模型 ID,例如 omni-moderation-latest。
是否允许模型并行调用工具。
用于提高相似请求缓存命中率的稳定键;取代 user 字段。
已弃用,请使用 prompt_cache_options.ttl。
in_memory, 24h 推理模型配置。
Hide child attributes
Hide child attributes
推理强度。
none, minimal, low, medium, high, xhigh, max 推理摘要级别。
auto, concise, detailed 推理摘要生成设置。
auto, concise, detailed 推理上下文设置。
auto, current_turn, all_turns 推理执行模式,常见值为 standard 或 pro。
稳定的终端用户标识符,用于协助检测滥用;建议使用用户名或邮箱的哈希值。
64请求的服务层级。
auto, default, flex, scale, priority, fast, ultrafast 是否以 SSE 流式返回事件。
采样温度;通常与 top_p 二选一调整。
0 <= x <= 2核采样阈值;通常与 temperature 二选一调整。
0 <= x <= 1模型在生成响应时可调用的工具,包括 function、web_search、file_search、code_interpreter、computer、MCP 等。
Hide child attributes
Hide child attributes
工具类型。
函数或工具名称。
工具用途说明。
函数输入参数的 JSON Schema。
函数参数是否严格遵循 Schema。
函数输出的 JSON Schema。
file_search 使用的向量存储 ID 列表。
file_search 的筛选条件。
code_interpreter 容器配置。
MCP 服务器标签。
MCP 服务器 URL。
控制模型如何选择工具。
none, auto, required 每个输出位置最多返回的高概率词元数量。
0 <= x <= 20已弃用。输入超出上下文窗口时的截断策略。
auto, disabled 已弃用,请使用 safety_identifier 和 prompt_cache_key。
Qwen / 百炼兼容扩展,建议优先使用 reasoning.effort;两者同时设置时 reasoning.effort 优先。
Qwen OCR 扩展,仅支持 OCR 定制任务的模型可用。
响应
Response 的唯一 ID。
对象类型,固定为 response。
response Response 创建时间的 Unix 时间戳,单位为秒。
实际使用的模型 ID。
模型生成的输出项列表,顺序和数量取决于模型响应。
Hide child attributes
Hide child attributes
输出项 ID。
输出项类型。
message, function_call, custom_tool_call, reasoning, web_search_call, file_search_call, code_interpreter_call, computer_call, image_generation_call 输出项状态。
message 输出项的角色。
assistant message 输出项的内容块。
Hide child attributes
Hide child attributes
内容块类型。
output_text, refusal, summary_text output_text 或 summary_text 的文本。
模型拒绝说明。
文本注释,例如文件引用或 URL 引用。
Hide child attributes
Hide child attributes
注释类型。
被引用文件的 ID。
被引用文件名。
被引用 URL。
引用标题。
引用起始字符位置。
引用结束字符位置。
函数或工具调用 ID。
被调用函数或自定义工具名称。
JSON 字符串形式的函数调用参数。
自定义工具调用输入。
加密的推理内容;需通过 include 请求。
推理摘要内容。
Response 完成时间的 Unix 时间戳;仅 status 为 completed 时出现。
响应生成状态。
completed, failed, in_progress, cancelled, queued, incomplete SDK 便捷字段:输出中所有文本内容的拼接结果。
应用于该响应的系统或开发者指令。
上一条 Response 的 ID。
词元使用统计。
Hide child attributes
Hide child attributes
输入词元数。
输出词元数。
总词元数。
是否允许并行工具调用。
本响应使用的采样温度。
本响应使用的核采样阈值。
请求设置的最大输出词元数。
请求设置的最大工具调用次数。
实际使用的服务层级。
是否后台运行。
请求使用的安全标识符。

