Take a screenshot
Loads `url` (or renders `html`) in a warm browser, captures the viewport, the full page or one element, and composes it with a style (background, window frame, padding, shadow). Returns JSON with signed artifact URLs, or the image bytes directly when `Accept` is `image/png`, `image/jpeg` or `image/webp`. `variants` adds extra encodings of the same capture. Bills one `render.screenshot` per capture plus one per variant.
POST
/v1/render/screenshots
Loads `url` (or renders `html`) in a warm browser, captures the viewport, the full page or one element, and
composes it with a style (background, window frame, padding, shadow). Returns JSON with signed artifact
URLs, or the image bytes directly when `Accept` is `image/png`, `image/jpeg` or `image/webp`. `variants`
adds extra encodings of the same capture. Bills one `render.screenshot` per capture plus one per variant.
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)
Header Parameters
Idempotency-Key
string
optional
header
A unique value (for example a UUID) that makes this request safe to retry. Scoped to your project for 24
hours: a retry with the same key, method, path and body returns the stored response with
`Idempotent-Replayed: true`, and only to the same API key. Reusing the key for a different request returns
`409 idempotency_key_conflict`.
Request Body required
application/jsonOne of:
Option 1unknown
Option 2unknown
Responses
200
The screenshot. JSON by default; the primary image when `Accept` asks for it.
application/jsonid
string
REQUIRED
object
string
REQUIRED
Enum:
screenshotstatus
string
REQUIRED
Screenshots are synchronous, so a stored screenshot always succeeded.
Enum:
succeededsource
object
REQUIRED
url
string (uri)
html
boolean
Present when the screenshot rendered inline HTML.
Enum:
trueprofile
string
width
integer
REQUIRED
height
integer
REQUIRED
format
string
REQUIRED
Enum:
webp, png, jpegartifacts
object[]
REQUIRED
The primary image first, then variants.
Array of:
id
string
REQUIRED
object
string
REQUIRED
Enum:
artifactkind
string
REQUIRED
Enum:
image, mp4, gif, poster, vtt, srtcontent_type
string
REQUIRED
bytes
integer
width
integer
height
integer
duration_ms
integer
url
string (uri)
Signed URL on `usercontent.b3os.org`, `https://usercontent.b3os.org/a/<id in host-safe form>/<name>?node=&exp=&sig=`:
an Ed25519 signature by the node's key over the method, path and expiry (`renderGetArtifactContent`), no
cookies. It works as soon as the artifact is reported, while the upload to storage is still finishing.
url_expires_at
string (date-time)
created_at
string (date-time)
expires_at
string (date-time)
When the artifact is deleted.
created_at
string (date-time)
REQUIRED
expires_at
string (date-time)
REQUIRED
timing
object
Server-side phase durations in milliseconds with microsecond resolution: the same phases as the
`Server-Timing` header, keyed `<phase>_ms`. `total_ms` is always present. Phase names are product-specific
and documented per operation. Example values in this reference are illustrative, not measurements.
total_ms
number
REQUIRED
metadata
object
REQUIRED
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of
`A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
400
The request failed validation (`invalid_request`, `invalid_url`).
401
Missing, malformed, expired or revoked credentials (`unauthorized`).
402
The organization has no credits left, or the key reached its spend cap.
403
The egress guard refused the source URL (`egress_denied`).
409
The object's state does not allow this operation, or the idempotency key conflicts.
413
The request body exceeds this operation's limit.
415
The Content-Type is not accepted by this operation.
422
The element to capture was not found (`target_not_found`).
429
A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500
Something failed inside B3OS (`internal`). Retry with backoff.
501
`profile` was given but this node cannot load browser profiles into render yet (`not_implemented`): render
reads profiles through vision's profile API, which is not on the node. Capture without `profile`.
502
The page could not be loaded or captured (`capture_failed`).
503
The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X POST 'https://beta-api.b3os.org/v1/render/screenshots' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com", "html": "string", "profile": "string", "viewport": { "width": 320, "height": 240 }, "dpr": 1, "full_page": false, "target": { "role": "button", "name": "Continue" }, "wait_until": "load", "wait_for_ms": 0, "timeout_ms": 30000, "theme": "auto", "hide": [ "string" ], "block_ads": true, "style": { "background": "string", "frame": "string", "cursor": "string", "captions": "string", "click_effect": "string", "overrides": {} }, "format": "webp", "quality": 90, "variants": [ { "format": "webp", "width": 16, "quality": 1 } ], "metadata": { "customer": "acme", "ticket": "ENG-1423" }}'
const response = await fetch('https://beta-api.b3os.org/v1/render/screenshots', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "url": "https://example.com", "html": "string", "profile": "string", "viewport": { "width": 320, "height": 240 }, "dpr": 1, "full_page": false, "target": { "role": "button", "name": "Continue" }, "wait_until": "load", "wait_for_ms": 0, "timeout_ms": 30000, "theme": "auto", "hide": [ "string" ], "block_ads": true, "style": { "background": "string", "frame": "string", "cursor": "string", "captions": "string", "click_effect": "string", "overrides": {} }, "format": "webp", "quality": 90, "variants": [ { "format": "webp", "width": 16, "quality": 1 } ], "metadata": { "customer": "acme", "ticket": "ENG-1423" } })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/render/screenshots', headers=headers, json={ "url": "https://example.com", "html": "string", "profile": "string", "viewport": { "width": 320, "height": 240 }, "dpr": 1, "full_page": false, "target": { "role": "button", "name": "Continue" }, "wait_until": "load", "wait_for_ms": 0, "timeout_ms": 30000, "theme": "auto", "hide": [ "string" ], "block_ads": true, "style": { "background": "string", "frame": "string", "cursor": "string", "captions": "string", "click_effect": "string", "overrides": {} }, "format": "webp", "quality": 90, "variants": [ { "format": "webp", "width": 16, "quality": 1 } ], "metadata": { "customer": "acme", "ticket": "ENG-1423" }})print(response.json())
200
Response
{ "id": "shot_01m5t4gy1j4hazr9khn5x51m6f", "object": "screenshot", "status": "succeeded", "source": { "url": "https://app.example.com/billing" }, "width": 1792, "height": 1092, "format": "webp", "artifacts": [ { "id": "art_01m5t41x77fg4pdnm2ryq73wgs", "object": "artifact", "kind": "image", "content_type": "image/webp", "bytes": 148210, "width": 1792, "height": 1092, "url": "https://usercontent.b3os.org/a/art-01m5t41x77fg4pdnm2ryq73wgs/screenshot.webp?node=n1&exp=1793040000&sig=qOxWOOryXIikfgvLdKZ3rjxZyxuO_eFCf-VXOHy2Zf5AEuXtOr-JsyyXTvIPP8joM4Rbp519aKjyAkMMxVAvAQ", "url_expires_at": "2026-10-26T18:40:00.000Z", "created_at": "2026-10-25T18:40:00.118Z", "expires_at": "2026-11-01T18:40:00.118Z" } ], "created_at": "2026-10-25T18:40:00.000Z", "expires_at": "2026-11-01T18:40:00.118Z", "timing": { "claim_ms": 1, "navigate_ms": 37.8, "settle_ms": 50.4, "capture_ms": 21.4, "compose_ms": 11.9, "encode_ms": 9.6, "total_ms": 133.4 }, "metadata": {}}
API Playground
Try this endpoint
POST
/v1/render/screenshots