Render a scrolling website preview
Loads and settles a website, preloads lazy content, then records a top-to-bottom browser motion at 30 frames per second. per_page moves one viewport at a time and pauses for 750ms between steps. single_sweep makes one continuous eased pass. Sticky and fixed elements behave as they do in the browser.
The response is one multipart/form-data payload containing the first video frame as poster.jpg and the H.264 video as preview.mp4. Ironfang Render calculates the duration from the page height and selected motion, up to a 60 second hard limit. A preview counts its output seconds, rounded up, against render.site_preview_second: the 60 second limit is reserved before the recording starts and the real length is committed when the preview is delivered. Failed work counts nothing and cached repeats are free.
This endpoint is available on the product-partitioned Ironfang Render URL only. It has no unprefixed /v1/site-preview compatibility route.
Request
- Base URL: https://api.ironfang.com/render
- URL: https://api.ironfang.com/render/v1/site-preview
- Auth: HTTP bearer
Headers
Makes a synchronous render happen, and count, at most once. Any string up to 255 characters, remembered per account. The first request under a key is admitted and rendered as usual; a synchronous result is not kept, so the same request again under the key is a 409 idempotency_key_used and reserves nothing - send a new key to render again. A different request under a used key is a 409 idempotency_conflict. An identical request inside the cache window is still served from cache.
Request body
Example request
{
"actions": [
{
"selector": "#show-more",
"type": "click"
},
{
"selector": "#details",
"type": "wait_for_selector"
}
],
"css": ".chat-widget { display: none !important; }",
"script": "document.querySelector('#pricing')?.click();"
}Response
The poster image and scrolling MP4 returned as two file parts.
Changes
No recorded changes to this operation across all 1 revision of this API.