OpenAI compatible API · Attested · Public status

Responses API Web Search

Use OpenAI-compatible web_search tools inside the attested TrustedRouter gateway with citations, source controls, streaming events, and explicit privacy limits.

Verify gateway
Onebase URL to migrate
100sof models and routes
Noneprompt logs by default
Attested hosted tool

Search the live web through the Responses API.

Add an OpenAI-compatible web_search tool. TrustedRouter asks the selected model for bounded search queries, calls Exa from inside the attested gateway, and returns cited source material without sending the original request body through the control plane.

  • web_search and web_search_preview
  • Non-streaming and Responses SSE lifecycle events
  • URL citation annotations and optional full source lists
  • At most three search calls per response
OpenAI Python SDKResponses
from openai import OpenAI

client = OpenAI(
    api_key="sk-tr-v1-...",
    base_url="https://api.trustedrouter.com/v1"
)

response = client.responses.create(
    model="anthropic/claude-sonnet-5",
    input="What changed in Python this week? Cite sources.",
    tools=[{
        "type": "web_search",
        "search_context_size": "medium"
    }],
    tool_choice="required",
    include=["web_search_call.action.sources"],
    store=False
)

print(response.output_text)

Search controls

Context

Bound the evidence.

Set search_context_size to low, medium, or high. Larger contexts return more source material and can increase latency and model input cost.

Domains

Constrain sources.

Use filters.allowed_domains or filters.blocked_domains. A request may use one list, not both.

Location

Localize results.

Pass user_location with a two-letter country code. Precise city, region, and timezone controls are rejected until implemented.

Streaming

Observe the search lifecycle.

Streaming responses emit response.web_search_call.in_progress, response.web_search_call.searching, and response.web_search_call.completed before normal output text events and response.completed.

Source filterJSON
{
  "type": "web_search",
  "search_context_size": "low",
  "filters": {
    "allowed_domains": ["python.org", "github.com"]
  },
  "user_location": {
    "type": "approximate",
    "country": "US"
  }
}
Privacy boundary

Search is an explicit external disclosure.

The model can derive search queries from your prompt. Exa receives those queries plus configured filters and returns results to the enclave. Exa does not receive the original request body directly, but generated queries can contain prompt-derived information.

TrustedRouter therefore rejects hosted web search on trustedrouter/zdr, trustedrouter/e2e, trustedrouter/confidential, and trustedrouter/eu routes until Exa has an approved compatible posture. Do not attach web_search to sensitive requests unless this disclosure is acceptable.

Review subprocessors Verify the gateway

Workspace access

Sign in

Choose a sign in method. New email and OAuth accounts include $0.10 in starter credit; wallet-only accounts start at $0.

By signing in you agree to the terms of service and privacy policy.