功能指南

Web 搜索工具

Responses API 的内置联网检索工具:在 tools 里声明 web_search,读 output 数组就能拿到检索结果。

Web 搜索是 Responses API 的内置工具,模型在需要实时信息时自动联网检索。

使用 Web 搜索工具

tools 里声明 web_search

json
{
  "model": "gpt-5.6-sol",
  "input": "今天北京的天气如何?请联网查",
  "tools": [{ "type": "web_search" }]
}

响应结构

output 数组里会依次出现 reasoningweb_search_call(模型执行的搜索)以及最终的 message;搜索过程无需客户端处理,直接读取 messageoutput_text 即可。

50 篇文档。文中出现的模型名与价格以模型广场的实时数据为准。