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" }].

Rules

  • Only safe http(s) URLs: no credentials, private or loopback hosts, local-use DNS names, or sensitive query keys.
  • 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.
The body accepts only urls; omit model IDs, messages, and privacy-level options. 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, private addresses, and sensitive query parameters are rejected. Results preserve input order.
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.