Documentation Index
Fetch the complete documentation index at: https://docs.toapis.com/llms.txt Use this file to discover all available pages before exploring further.
Responses API
OpenAI Responses API 格式,支持函数调用、内置工具与服务端多轮上下文管理Responses API 是 OpenAI 推出的新一代 Agentic 接口,相比 Chat Completions 提供更强大的能力:
- 函数调用(Function Calling):模型可调用自定义函数
- 内置工具:
web_search_preview(联网搜索)等开箱即用 - 服务端多轮上下文:通过
previous_response_id自动维护对话历史,无需客户端传完整消息 - 推理力度控制:通过
reasoning.effort精确调节思考深度
Authorizations
Body
模型名称示例:
"gpt-5-pro-official"、"gpt-5.3-codex-official"、"gpt-5.2-official"用户输入,支持两种格式:
- 字符串:简单文本输入
- 消息数组:多轮对话格式
系统指令,指导模型行为(等同于 Chat Completions 中的 system message)
是否启用流式输出
生成内容的最大 token 数量
采样温度,范围
0 ~ 2核采样概率阈值,范围
0 ~ 1上一次响应的 ID,用于服务端自动拼接多轮上下文,无需客户端传完整历史消息
推理配置
可用工具列表
工具选择策略:
auto、none、requiredResponse
响应的唯一标识符(可用作
previous_response_id)固定为
response响应状态:
completed、failed、in_progress输出项列表,可能包含多种类型:
message:文本回复,包含content[].textfunction_call:函数调用请求,包含name和argumentsreasoning:推理过程(当reasoning.effort非none时出现)web_search_call:联网搜索调用记录
token 消耗统计
usage.input_tokens:输入 token 数usage.output_tokens:输出 token 数usage.output_tokens_details.reasoning_tokens:推理 token 数usage.total_tokens:总 token 数