Render HTML to an image

Renders an HTML payload to a PNG, JPEG, or WebP screenshot.

post/v1/screenshot

Request body

htmlstring required

The raw HTML string to render into an image.

typestring

Image type: png, jpeg, or webp.

fullPageboolean

Capture the full scroll height of the page.

qualityinteger

Image quality from 1 to 100 for JPEG and WebP.

omitBackgroundboolean

Render with a transparent background for PNG output.

waitUntilstring

Lifecycle event to wait for before rendering. Supported values: load, domcontentloaded, networkidle, commit.

waitForSelectorstring

Optional CSS selector to wait for before capturing.

delayMsinteger

Optional extra render delay in milliseconds. Maximum 10000.

Response

Successful screenshot generation.

Changes

No recorded changes to this endpoint across all 1 revision of this API.