Server tools are currently in beta. The API and behavior may change.
The openrouter:web_fetch server tool gives any model the ability to fetch
content from a specific URL. When the model needs to read a web page or PDF
document, it calls the tool with the URL. OpenRouter fetches and extracts the
content, returning text that the model can use in its response.
{ "type": "openrouter:web_fetch" } in your tools array.auto,
which uses native provider fetch when available or falls back to
Exa).The web fetch tool accepts optional parameters to customize behavior:
The web fetch server tool supports multiple fetch engines:
auto (default): Uses native fetch if the provider supports it,
otherwise falls back to Exanative: Forces the provider’s built-in web fetchexa: Uses Exa’s Contents API to extract page content
(supports BYOK)openrouter: Uses direct HTTP fetch with content extractionfirecrawl: Uses Firecrawl’s scrape API
(BYOK — bring your own key)parallel: Uses Parallel’s extract API for
high-quality content extractionFirecrawl uses your own API key. To set it up:
To prevent runaway costs:
Restrict which domains can be fetched using allowed_domains and
blocked_domains:
When allowed_domains is set, only URLs from those domains will be fetched.
When blocked_domains is set, URLs from those domains will be rejected.
Use max_content_tokens to limit the amount of content returned:
Content exceeding this limit is truncated. This is useful for controlling context window usage when fetching large pages.
The web fetch server tool also works with the Responses API:
When the model calls the web fetch tool, it receives a response like:
If the fetch fails, the response includes an error:
All pricing is in addition to standard LLM token costs for processing the fetched content.