Create a styled capture
POST /v1/capture
Auth: Bearer API keyRate limit: Plan dependentSDKs: cURL, JavaScript, Python, CLI

Captures a URL, composes the requested styling, stores the image, and returns a CDN URL.

Request example

Styled browser screenshot
bash
curl -X POST "https://screenframed.com/v1/capture" \ -H "Authorization: Bearer $SCREENFRAMED_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://screenframed.com", "device": "browser-macos", "background_preset": "midnight", "shadow": "float", "aspect_ratio": "16:9" }'

Required body fields

urlstringrequiredbody

The HTTP or HTTPS URL to capture. site is accepted as a convenience alias.

Common optional fields

devicestringbody

Frame or viewport preset. Values include browser-macos, browser-windows, iphone-16-pro, ipad-pro-m4, and macbook-pro-16.

background_presetstringbody

Named gradient preset such as aurora, sunset, ocean, midnight, arctic, dusk, forest, or ember.

backgroundstringbody

Hosted ScreenFramed background reference such as fractal-glass-gradients/fractal-glass-34. The API resolves it to a render-sized image variant.

Custom public image URL. This overrides background when both fields are present.

selectorstringbody

CSS selector for deterministic element capture.

elementstringbody

Natural-language description of the element to capture.

asyncbooleanbody

When true, returns a job id with status pending instead of waiting for the render to finish.

Response fields

idstring

Capture id, prefixed with cap_.

urlstring

CDN URL for the generated image.

widthnumber

Final image width in pixels.

heightnumber

Final image height in pixels.

credits_usednumber

Credits charged for this render. Cached responses return 0.

Created 201
json
{ "id": "cap_01KNS1WNPW9FCHZSK4XNTHMB0H", "url": "https://cdn.screenframed.com/r/cap_01KNS1WNPW9FCHZSK4XNTHMB0H.png", "width": 1600, "height": 900, "format": "png", "duration_ms": 1842, "credits_used": 3, "cached": false, "warnings": [], "created_at": "2026-04-27T15:00:00.000Z"}

GET shorthand

GET /v1/capture supports query-string shorthand for simple integrations and signed URLs:

bash
curl "https://screenframed.com/v1/capture?site=screenframed.com&device=browser-macos&bg=midnight&shadow=soft" \ -H "Authorization: Bearer $SCREENFRAMED_API_KEY"

For production server integrations, prefer POST /v1/capture because nested JSON is clearer and easier to validate.

Ask a question... ⌘I