B2BB2B LLM

Búsqueda web alojada

Utilice la herramienta Responses API web_search en lugar de un punto final independiente.

Búsqueda web alojada

Model Gate no publica un artículo por separado. /v1/web-search solicitar contrato. Usar POST /v1/responses con el alojado web_search herramienta.

Pedido

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

Respuesta

El objeto Respuestas completo incluye la salida del modelo y fuentes de búsqueda web auditables cuando el modelo ascendente admite la búsqueda alojada.

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