urlstringrequiredThe page. Private and internal addresses are refused.
typestringpageUse screenshot for an image-only result; use page for readable page content.
screenshotbooleanfalseAttach an image to a page result; this keeps the full page.
viewport{ width, height }1280 × 720CSS viewport (320–2560 × 480–1600). With type: "screenshot" and deviceScaleFactor: 1, the image dimensions exactly match this viewport.
deviceScaleFactor1 | 2 | 31Raster density multiplier; 2× and 3× increase output pixels.
waitinteger1000Extra visual settling time, 0–10000 ms.
includestring[]["console", "network"] — errors and slow requests from the same capture.
Asking for more costs nothing more
The page is rendered once; the text, the image, the console and the requests all come from it. So screenshot: true and include together are still one credit — and two separate calls for the same page are two.
Looking at what it built
fetch({ url: "http://…/preview", screenshot: true, include: ["console", "network"] })# The call the model makes:
# fetch {"url": "https://…/preview"}
# From your own code, the same capture with screenshot and console:
api.tools.fetch({"url": url, "screenshot": True, "include": ["console", "network"]})The system prompt tells the agent to look at a page it built rather than assume it renders, and to read the console before guessing why something fails. This is the tool that makes that possible.
The address is checked
The scheme must be http or https and the host must resolve to a public address; a redirect does not escape the check. That matters most here, because the agent follows URLs it found in text.
A page that never settles is still returned
What had loaded is captured, with a flag saying it timed out. A credit is not spent for nothing.