Better failure and timeout handling

Requests fail within 90 seconds instead of retrying for minutes, and every API error is returned as JSON.

Changelog1 min read

Written by

Dmytro Krasun

Published on

When our rendering servers were unavailable or slow, the API could retry a request on several servers, each time with a new time limit, so a request could take several minutes before failing.

Now the API waits at most 90 seconds in total for its rendering servers, including any retry on another server:

  • Requests fail sooner. Some requests that used to succeed after long retries now fail with an error instead. Retrying such a request later is safe.
  • Timeouts are no longer retried. If a rendering server times out, the request fails, because the render may still be running and a retry would render the screenshot twice. This includes GPU rendering: without fail_if_gpu_rendering_fails, the request falls back to CPU rendering only when the GPU servers are unavailable and enough time is left.
  • Large files aren’t cut off. The limit covers waiting for the rendering servers, not transferring the result, so a large PDF or video can finish downloading after it.

Errors are also more consistent:

  • Every error the API returns is JSON with error_code, error_message and documentation_url, as described in the errors documentation, including when a rendering server is unavailable.

See the timeout option.

Read more product updates

New features, bug fixes, and optimizations...

View all product updates
New free tools: curl converters, HTML to Image, and dark mode screenshots

New free tools: curl converters, HTML to Image, and dark mode screenshots

Convert curl commands to code, render HTML and CSS to images, and check how a website looks in dark mode, for free and without registration.

Read more

1 min read

Available in Context7

Available in Context7

ScreenshotOne documentation is now available in Context7.

Read more

1 min read

More consistent screenshots and clearer errors

More consistent screenshots and clearer errors

When reducing motion, sliders, carousels and looping animations stay still more often, so repeated screenshots of the same page match. Errors name the failed requests and password-protected sites.

Read more

2 min read

Automate website screenshots

Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.