Skip to main content
A server-side tool is turned on with a request field. The gateway decides whether it should run, runs it, feeds the result to the model, and reports what happened in the response. No second call.

The Tools

  • Web search: web_search: true or tools: [{"type": "web_search"}].
  • Web fetch: web_fetch: true or tools: [{"type": "web_fetch"}].
  • File parser: extracts text from attached documents before the model runs.
Sending the same feature twice (field and tools entry) is rejected.

Response

  • A web_search object with source metadata (title, url, domain, date, snippet), the effective retrieval_mode, and the retrieval request count.
  • usage.server_tool_use: web_search_requests, web_search_results, web_fetch_requests. Omitted when no tool ran.
Tool use counts toward usage in addition to the model’s tokens.

Model Support

Per model: supports_web_search and supports_web_fetch on the catalog entry, GET /v1/models?supports=web_search. Enabling a tool on a model without it is rejected. Encrypted routes report both false because the final encrypted request cannot carry them.

Web Search

Search before the model answers.

Web Fetch

Read a URL in the prompt.

File Parser

Attached documents.

Tool Calling

Your own functions.

Standalone API calls

For retrieval and parsing without inference, use web search, web fetch, or document parsing. These calls accept API credentials, require no model, and are billed independently of chat completions.