Tool

Screenshot API

URL in, image out. A real browser renders the page, not a fetch.

The endpoint

GET /api/shot?url=https://example.com&viewport=mobile&full=1
ParameterNotes
urlRequired. Public http/https only.
viewportdesktop (1440×900), laptop (1280×800), tablet (834×1112), mobile (390×844)
full=1Whole page rather than the viewport.
formatpng, jpeg, webp
quality20–100, jpeg and webp only.
dark=1Emulates prefers-color-scheme: dark.
delayExtra settle time in ms, capped at 5000.

The page is loaded to networkidle0 rather than load, because a modern page fires load with half its content still arriving. delay is there for the rest — an entrance animation, a font swap, a chart that draws itself.

Setup

This is the one tool here with a dependency outside the account's free tier defaults: Cloudflare Browser Rendering. It needs two secrets.

npx wrangler secret put CF_ACCOUNT_ID
npx wrangler secret put BROWSER_TOKEN

The token is an API token with Account · Browser Rendering · Edit. Until both are set the endpoint answers 501 and says so — it is deliberately implemented over the REST API rather than thebrowser binding, so a missing token turns off one tool instead of failing the whole deploy.

Why it is not public

Two reasons, and both are the same reason. Every capture is billed browser time, and an open screenshot endpoint is a fetcher that will retrieve whatever anyone points it at, from an address that belongs totesseract.page. Private and loopback addresses are rejected regardless.

Esc