Skip to main content
abliteration.ai runs web searches server-side and feeds the results to the model. Three different API shapes, one per surface.

Anthropic messages

Add a web_search tool to the tools array:
client.messages.create(
    model="abliterated-model",
    max_tokens=2048,
    tools=[{
        "type": "web_search_2025_03_05",
        "name": "web_search",
        "max_uses": 5,
    }],
    messages=[{"role": "user", "content": "Latest SEC filings for NVDA"}],
)
The response contains server_tool_use and web_search_tool_result blocks alongside the usual text blocks:
"content": [
  {"type": "server_tool_use", "id": "srvtoolu_...", "name": "web_search", "input": {"query": "..."}},
  {"type": "web_search_tool_result", "tool_use_id": "srvtoolu_...", "content": [
    {"type": "web_search_result", "url": "...", "title": "...", "encrypted_content": "..."}
  ]},
  {"type": "text", "text": "NVDA filed..."}
]

OpenAI chat completions

Use the web_search_options field at the top level of the request body — not the tools array:
client.chat.completions.create(
    model="abliterated-model",
    messages=[{"role": "user", "content": "Latest SEC filings for NVDA"}],
    extra_body={
        "web_search_options": {
            "include_citations": True,
            "search_context_size": 5,
            "user_location": "us-east-1",
        }
    },
)
web_search_options and tools are mutually exclusive. Requests with both return 400.

OpenAI Responses API

Add a web_search entry to the tools array:
client.responses.create(
    model="abliterated-model",
    input="Latest SEC filings for NVDA",
    tools=[{"type": "web_search"}],
)
Accepted type aliases: web_search, web_search_preview, web_search_2025_08_26, web_search_preview_2025_03_11. When combined with tool_choice={"type": "required"}, the search fires before the model starts, and the stream emits five lifecycle events up front:
response.output_item.added        (web_search_call, status: in_progress)
response.web_search_call.in_progress
response.web_search_call.searching
response.web_search_call.completed
response.output_item.done
Then the model stream begins.

Domain allow/block

Projects configured through Policy Gateway can restrict which domains web search may reach. See Policy Gateway onboardingweb_tools.

Known limitations

Replaying a previous assistant message that contains server_tool_use or web_search_tool_result blocks back into a new request can trigger a 422 upstream. Strip those blocks before replaying. Tracked in the compatibility matrix.