Docs / Screenshots

Website screenshot API

GET /v1/screenshot captures any public URL as PNG or JPEG in real Chromium; POST /v1/screenshot captures inline HTML. Authenticated and metered.

01

Example

terminal
curl -H "Authorization: Bearer $PROOFITO_KEY" \
  "https://api-staging.astraeatech.dev/proofito/v1/screenshot?url=https://example.com&width=1200&height=800&format=png" \
  -o shot.png
terminal
curl -H "Authorization: Bearer $PROOFITO_KEY" -H "Content-Type: application/json" \
  -d '{"html":"<h1>Hello</h1>","width":800}' \
  https://api-staging.astraeatech.dev/proofito/v1/screenshot -o shot.png

POST reads the same option names from the JSON body; bodies are capped at 256 KB (HTTP 413) and must use Content-Type: application/json (else HTTP 415).

02

Parameters

  • urlrequired — Absolute http(s) URL to capture. Private, loopback, and metadata hosts are blocked.
  • width1200 — Viewport width, 1–3840 px.
  • height800 — Viewport height, 1–2160 px. Ignored with full_page.
  • full_pagefalse — true/1 captures the full scrollable page (pages taller than 16000 px are rejected with guidance, HTTP 422).
  • formatpng — png or jpeg (case-insensitive).
  • device_scale1 — Device pixel ratio, 1–3. Use 2–3 for retina captures.
  • quality— — JPEG quality, 1–100 (format=jpeg only).
  • wait_ms0 — Extra settle time after load, 0–10000 ms, for late layout and animations.
  • timeout_ms— — Per-request render cap, 1000–60000 ms. Can only tighten the worker default.
  • selector— — CSS selector to capture instead of the viewport (up to 512 chars; exclusive with clip_*, viewport-mode only).
  • clip_x / clip_y / clip_w / clip_h— — Pixel rectangle to capture (clip_x/clip_y 0–20000, clip_w/clip_h 1–20000). All four must be given together; viewport-mode only.
  • block— — Comma-separated request blocking: ads, trackers, fonts, media (case-insensitive).
  • ttl86400 — Cache freshness in seconds, 0–604800. 0 bypasses 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. Every 200 carries X-RateLimit-Limit / X-RateLimit-Remaining plus an X-Cache-Key you can purge with DELETE /v1/cache?key=… (unmetered, and omitted when ttl=0). Every 200 also carries Cache-Control (public, max-age=<ttl>, or no-store when ttl=0); errors carry X-Cache: NONE instead, plus X-Response-Ms on render-path failures (400/413/415/422).

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.