Screenshot API error ยท HTTP 422
Image too large for its format
output_too_large_for_format
full_page, times device_scale_factor.How to recognize it
The API answers with status 422 and a JSON body with the message and the error.code output_too_large_for_format, for example:
HTTP/1.1 422
Content-Type: application/json
{
"error": {
"code": "output_too_large_for_format",
"message": "The screenshot is too large for format=webp: WebP images are at most 16,383 px wide and high (in device pixels: the viewport, or the whole page with full_page, times device_scale_factor). Use format=png, or capture a smaller page or viewport."
},
"message": "The screenshot is too large for format=webp: WebP images are at most 16,383 px wide and high (in device pixels: the viewport, or the whole page with full_page, times device_scale_factor). Use format=png, or capture a smaller page or viewport."
}Common causes
- A very long page with
full_page=truein WebP (at most 16,383 px a side) or JPEG (at most 65,500 px). - A GIF over 65,535 px a side or 25 megapixels.
- Any capture over about 500 megapixels, which Chrome cannot paint at all.
How to fix it
- Use
format=png, which has no side limit of its own. - Capture the viewport only, a smaller viewport, or a lower
device_scale_factor.
Billing
Not billed: a request answered with this error does not count against your quota.
Every response carries an X-Request-Id header. If this page does not explain the error, write to support@screenshotbase.com with that id. All statuses: status codes.
Other API errors
Screenshot API
Take screenshots from your code
screenshotbase renders any website in a real browser and returns the image: full page or viewport, any device size, retina, from 100+ countries, with cookie banners and ads hidden.
/v1/take documentation Screenshot API All documentation
300 free screenshots every month. No credit card required.
GET https://api.screenshotbase.com/v1/take?url=https://example.com&full_page=true
# Response: the image (PNG, JPG, WebP or GIF)
curl -G "https://api.screenshotbase.com/v1/take" \
--data-urlencode "url=https://example.com" \
-d viewport_width=1280 -d viewport_height=800 \
-d format=png \
-H "apikey: YOUR-API-KEY" \
-o screenshot.png