Screenshot API

Storage

Hosted Screenshot URLs, retention, and security when using response_type=json.

When you set "response_type": "json", the API uploads every Render to object storage (Cloudflare R2) and returns metadata instead of raw bytes.

JSON response shape

{
  "url": "https://cdn.example.com/r/01HW3QXP9ZK4M2JQT6XBVCYNFD.png",
  "format": "png",
  "width": 1280,
  "height": 720,
  "bytes": 142567,
  "cached": false,
  "billable": true,
  "render_duration_ms": 2341,
  "request_id": "req_01HW3QXP...",
  "expires_at": "2026-06-08T11:00:00Z"
}
FieldDescription
urlPublic HTTPS URL to the Screenshot image
formatpng, jpeg, or webp
width, heightFinal pixel dimensions
bytesFile size
cachedWhether this response came from the Render cache
billableWhether this Render counted toward monthly Quota
render_duration_msWall-clock Render time in milliseconds
request_idRequest ID for this call (req_…)
expires_atISO 8601 UTC timestamp when the URL expires

URL semantics

URLs are public and non-guessable — the path includes an unguessable Render ID (ULID). Treat the URL itself as the secret; anyone with the link can fetch the image until it expires.

Use JSON mode when you want to embed the Screenshot in an <img src="…"> without proxying bytes through your backend.

Retention

All Screenshots — regardless of Plan — are retained for 30 days from creation. The expires_at field reflects this retention window.

After expiry the URL stops working. Request a fresh Render to obtain a new URL.

Storage layout is per-Account: r2://bucket/{account_id}/{render_id}.{format}.

Image mode still uploads

Even with the default response_type=image, the API uploads the Screenshot to R2 internally (for cache pointers, idempotency replays, and audit). Only JSON mode exposes the public URL in the response.

See Screenshot reference for the full request schema.