B2BB2B LLM

ホスト型 Web 検索

スタンドアロン エンドポイントの代わりに Responses API web_search ツールを使用します。

ホスト型 Web 検索

Model Gate は別のバージョンを公開していません。 /v1/web-search 契約を要求します。使用 POST /v1/responses 主催者と一緒に web_search 道具。

リクエスト

curl https://api.model-gate.com/v1/responses \
  -H "Authorization: Bearer mg_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "input": [{"role": "user", "content": [{"type": "input_text", "text": "Find the latest official release notes."}]}],
    "tools": [{"type": "web_search"}],
    "tool_choice": "required",
    "include": ["web_search_call.action.sources"],
    "stream": false
  }'

応答

完成した Responses オブジェクトには、上流モデルがホスト型検索をサポートしている場合、モデル出力と監査可能な Web 検索ソースが含まれます。

{
  "id": "resp_...",
  "object": "response",
  "status": "completed",
  "output": [
    {
      "type": "web_search_call",
      "action": {
        "sources": [
          {"type": "url", "url": "https://example.com/source"}
        ]
      }
    },
    {
      "type": "message",
      "content": [
        {"type": "output_text", "text": "..."}
      ]
    }
  ]
}