API

Images and Web Search

Use image input or current web information only when the selected model supports it.

Image input

Check that the model reports vision: true. Send image and text parts in the user message.

{
  "model": "VISION_CAPABLE_MODEL",
  "messages": [
    {
      "role": "user",
      "content": [
        {"type": "text", "text": "Describe the warning shown in this image."},
        {"type": "image_url", "image_url": {"url": "https://example.com/screenshot.png"}}
      ]
    }
  ]
}

Use a short-lived image URL and remove sensitive metadata. Do not expose private storage objects with a permanent public link.

Use web_search: "auto" when the model may search if needed. Use always only when every answer must use current web sources. Search activity counts toward account usage.

{
  "model": "pro",
  "messages": [{"role": "user", "content": "Summarize today's service status notices."}],
  "web_search": "auto",
  "web_search_uses": 3
}

web_search_uses accepts a practical maximum of 10. Missing, invalid, zero, negative, or larger values are normalized to a safe supported bound. Start with 1 to 3. Do not enable search for private data or questions that your own database can answer.