API referenceScreenshot
Screenshot
StableCapture any web page as an image. Render the full scroll height, a fixed viewport, or a single element — at any device scale, in PNG, JPEG, or WebP. Costs 1 credit.
Endpoint
POST
https://api.renderkit.tech/v1/screenshotScreenshot parameters
| Parameter | Type | Description |
|---|---|---|
formatstring | string | Output image format. Options: png, jpeg, webp. Defaults to png. |
qualityinteger | integer | Compression quality 1–100. Applies to jpeg and webp. Defaults to 80. |
full_pageboolean | boolean | Capture the entire scroll height instead of just the viewport. Defaults to false. |
selectorstring | string | Capture only the element matching this CSS selector. |
clipobject | object | Crop to a fixed region: { x, y, width, height } in pixels. |
viewport_widthinteger | integer | Viewport width in pixels (320–3840). Defaults to 1440. |
viewport_heightinteger | integer | Viewport height in pixels (240–2160). Defaults to 900. |
device_scalenumber | number | Device pixel ratio 1–3. Use 2 for retina captures. Defaults to 1. |
mobileboolean | boolean | Emulate a mobile device (touch + mobile UA). Defaults to false. |
thumbnail_widthinteger | integer | Resize the screenshot proportionally to this width in pixels (1–5000). |
dark_modehobby+boolean | boolean | Render with prefers-color-scheme: dark. Defaults to false. |
omit_backgroundboolean | boolean | Transparent background (PNG/WebP only). Defaults to false. |
hide_selectorsarray | array | CSS selectors to hide before capture (up to 50). |
clickstring | string | Click this selector before capturing (e.g. open a menu). |
scroll_tostring | string | Scroll this selector into view before capturing. |
block_resourcesarray | array | Resource types to block. Any of image, stylesheet, font, media, script. |
block_adsboolean | boolean | Strip ads with a maintained filter list. Defaults to false. |
block_cookie_bannersboolean | boolean | Dismiss cookie-consent banners. Defaults to false. |
block_chatsboolean | boolean | Hide chat/support widgets. Defaults to false. |
meta_titleboolean | boolean | Include the page <title> in the response meta. |
meta_ogboolean | boolean | Include Open Graph tags in the response meta. |
Common parameters
| Parameter | Type | Description |
|---|---|---|
urlstring | string | Fully-qualified URL to render. Max 4096 chars. Provide this or html, not both. |
htmlstring | string | Raw HTML to render instead of fetching a URL. Up to 2 MB. Provide this or url. |
wait_untilstring | string | Navigation lifecycle event to wait for before rendering. Options: load, domcontentloaded, networkidle. Defaults to networkidle. |
delayinteger | integer | Extra wait after the page is ready, in milliseconds (0–10000). Defaults to 0. |
timeoutinteger | integer | Hard navigation timeout in milliseconds (5000–60000). Clamped to your plan's maximum. Defaults to 30000. |
wait_for_selectorstring | string | Block until this CSS selector appears in the DOM. |
user_agentstring | string | Override the browser User-Agent string. |
countrygrowth+string | string | Render from a US or GB IP so geo-restricted and region-walled pages load correctly. Options: us, gb. |
cookieshobby+array | array | Cookies to set before navigation. Up to 50 entries. |
headershobby+object | object | Extra HTTP request headers, e.g. an Authorization header for gated pages. |
inject_csshobby+string | string | CSS injected into the page before rendering (max 100 KB). |
inject_jsgrowth+string | string | JavaScript executed in the page before rendering (max 100 KB). |
cacheboolean | boolean | Serve an identical prior render from cache when available. Cache hits are free. Defaults to true. |
cache_ttlinteger | integer | Cache lifetime in seconds (0–2592000, i.e. up to 30 days). Defaults to 3600. |
cache_keystring | string | Override the automatic cache key to force-share or force-separate renders. |
asynchobby+boolean | boolean | Queue the render and return a job immediately instead of blocking. See Webhooks & async. Defaults to false. |
webhook_urlhobby+string | string | HTTPS URL that receives a signed render.done / render.failed callback when an async render finishes. |
webhook_secrethobby+string | string | Secret used to HMAC-sign the webhook payload (X-RenderKit-Signature). |
Request
curl https://api.renderkit.tech/v1/screenshot \
-H "x-api-key: $RK_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://stripe.com",
"full_page": true,
"format": "png",
"block_ads": true,
"device_scale": 2
}'Response
200 · application/json
{
"success": true,
"data": {
"id": "rnd_8fk2m1c4",
"type": "screenshot",
"status": "done",
"url": "https://cdn.renderkit.tech/renders/3a7b9c…e9.png",
"url_expires_at": "2027-06-14T10:24:01.000Z",
"meta": { "width": 2880, "height": 9720, "format": "png" },
"render_ms": 842,
"credits_used": 1,
"cached": false,
"created_at": "2026-06-14T10:24:00.000Z",
"completed_at": "2026-06-14T10:24:00.842Z"
},
"message": "Success"
}Capture a single element
Pass a selector to crop to one element — ideal for og-image generation or component snapshots.
POST /v1/screenshot
curl https://api.renderkit.tech/v1/screenshot \
-H "x-api-key: $RK_KEY" -H "Content-Type: application/json" \
-d '{ "url": "https://github.com/renderkit", "selector": "main .h-card", "omit_background": true }'Hosted, content-addressed URLs
Image bytes are stored by SHA-256, so identical renders share one immutable, permanently-cacheable URL. Artifacts are retained for 365 days (url_expires_at).