B2BB2B LLM

Pesquisa na web hospedada

Use a ferramenta Responses API web_search em vez de um endpoint independente.

Pesquisa na web hospedada

Model Gate não publica um separado /v1/web-search solicitar contrato. Usar POST /v1/responses com o hospedado web_search ferramenta.

Solicitar

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
  }'

Resposta

O objeto Responses concluído inclui a saída do modelo e fontes de pesquisa na Web auditáveis ​​quando o modelo upstream oferece suporte à pesquisa hospedada.

{
  "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": "..."}
      ]
    }
  ]
}