added

Native support for Gemini models - URL Context Tool

The new URL context tool enables models to access content directly from provided URLs, enhancing responses with external information for tasks like extracting data, comparing documents, synthesizing content, and analyzing code or documentation.

Key Features

  • Two-step retrieval: internal index cache first, live fetch if unavailable.
  • Returns url_context_metadata with retrieval details and safety checks.
  • Supports up to 20 URLs per request, max 34MB per URL.
  • Retrieved content counts toward input tokens (tracked in usage_metadata).

Supported Models

  • gemini-2.5-pro
  • gemini-2.5-flash
  • gemini-2.5-flash-lite

Best practices

  • Use direct, specific, fully qualified URLs (https://...).
  • Avoid login-restricted or paywalled content.
  • Combine with Google Search grounding for broader workflows.