Docs / Screenshots
Website screenshot API
GET /v1/screenshot captures any public URL as PNG or JPEG in real Chromium. Authenticated and metered.
01
Example
curl -H "Authorization: Bearer $SHOTPDF_KEY" \ "https://shotpdf.astraeatech.dev/v1/screenshot?url=https://example.com&width=1200&height=800&format=png" \ -o shot.png
02
Parameters
urlrequired — Absolute http(s) URL to capture. Localhost and metadata hosts are blocked.width1200 — Viewport width, 1–3840 px.height800 — Viewport height, 1–2160 px. Ignored withfull_page.full_pagefalse —true/1captures the full scrollable page.formatpng —pngorjpeg.ttl86400 — Cache freshness in seconds, 0–604800.0bypasses the cache.
03
Caching
Rendered bytes are cached; repeats served from cache carry X-Cache: HIT (first renders: MISS). Cached responses still count as one metered request each. Pass ttl=0 to force a fresh render.
04
Errors
Invalid options return 400 invalid_option (or invalid_url); a missing key returns 401 invalid_api_key; quota exhaustion returns HTTP 429. All errors use the shared JSON envelope. See the docs index for quotas, and HTML-to-PDF or OG images for the other endpoints.