Screenshots
POST /v1/screenshots captures any public web page as an image or PDF — no template
required.
# Request
curl https://api.mostlyrender.com/v1/screenshots \
-H "Authorization: Bearer mr_live_…" \
-H "Content-Type: application/json" \
-d '{
"url": "https://stripe.com",
"fullPage": true,
"output": "png"
}'
| Field | Type | Notes |
|---|---|---|
url |
string | Required. A public http(s) URL. |
width |
integer | Viewport width. Default 1200 (16–2400). |
height |
integer | Viewport height. Default 630 (16–2400). |
fullPage |
boolean | Capture the full scroll height. Default false. |
scale |
number | Device scale factor (retina). Up to 3. |
output |
string | png (default), jpeg, webp, or pdf. |
async |
boolean | Queue and return 202. |
webhookUrl |
string | Signed callback on completion (implies async). |
# Response
{
"id": "shot_abc123",
"url": "https://img.mostlyrender.com/mostlyrender/screenshots/shot_abc123.png",
"output": "png"
}
# URL safety
Screenshots only accept public http(s) URLs. Requests to private ranges,
loopback, link-local, or cloud metadata hosts are rejected with 400 — and the guard
re-checks after any redirect, so a public URL can’t bounce to an internal one.
# SDK
shot = mr.screenshot("https://stripe.com", full_page=True)
print(shot["url"])
Large pages can be slow — for those, use async + webhooks.