Skip to main content
Fetches the URLs the user names in a message and injects them as request-local context. Available on models with supports_web_fetch: true.

Invoking

Or as a tool entry: "tools": [{ "type": "web_fetch" }]. Web fetch runs on Chat Completions.

Rules

  • Only safe http(s) URLs: no credentials in the URL, and no private, loopback, or local-use hosts. The path, query string, and fragment are kept as sent.
  • Fetched content is untrusted context for that turn. Nothing is stored.

Response

usage.server_tool_use.web_fetch_requests reports how many fetches ran.

Standalone fetch

POST /api/v1/web/fetch retrieves content without running a chat model. Authenticate with an API key or an OAuth bearer with cli:inference; browser cookies alone are not accepted.
Supply one to three distinct public HTTP(S) URLs; configured service limits may be lower. Each URL is limited to 400 UTF-8 bytes. URLs must be safe and canonical: embedded credentials and private addresses are rejected. By default, a mixed batch returns HTTP 200. Read results for usable pages and failures for unreadable URLs and their reasons. Each list follows input order. Set "allow_partial": false to require every page. A batch with no usable pages still returns an error.
last_updated is a provider-supplied modification date or null. Each call is billed independently, using the subscription allowance before prepaid balance, and respects spend caps and rate limits. Retrieved content is request-local. After a 502 provider_error with an unknown provider outcome, do not retry automatically: retrieval may already have been billed. See the standalone endpoint for schemas and errors.