$RT and browser b1 (Sessions).
Save a screenshot
screenshot captures the page — the viewport by default, full_page for the
whole scrollable document, or element to clip to one element. Returns
{data, format, width, height} with data base64.
Save a PDF
pdf renders a tab to PDF — invoices, reports, printable views. The tab’s
target_id is in the path; read it from targets. Returns {data, format}
with data base64.
Save a download
Files the page downloads are saved in the runtime.downloads lists them. Pass wait_name to wait until a file whose name contains that text finishes — the usual step after clicking a download link. The call returns 408 if nothing arrives within timeout_ms (default 30 seconds). download returns the file bytes as base64. Pass meta_only to get the name and size without the bytes.
{id, filename, path, bytes, state, mime, url} —
state is in progress while the file transfers, then completed or
canceled. In TypeScript, downloads returns the entry array directly; in
Python it returns {"downloads": [...]}.
Watch the page live
view publishes a private watch URL for a browser — the display’s view when
the browser is headed, or a screencast of the tab (target_id, empty = current
tab) when it is headless. Open browser_url — it carries a fresh auth
token. Every view call mints a new token, so repeat calls always return a
working link; each mint invalidates the previous token (viewers already
connected keep their live session). rotate_token/rotateToken/
--rotate-token is accepted but no longer needed. URLs expire after an hour.
201 with the web-service record — browser_url, url,
port, expires_at, and token (fresh on every call).
fps defaults to 15
and caps at 30; quality is JPEG quality 1–100.
Watch-only links. role="watch" (role: 'watch', --role watch)
mints a view-only view_token — connections holding it see frames but can
never inject input. The SDKs compose it into watch_url/watchUrl
(browser_url + &vt=<view_token>); cURL appends &vt= itself. Hand the
watch URL to a human observer and keep the control URL for the agent —
input from a watch connection is dropped, never relayed. Omit role (or
pass "control") for the default input-capable link. Headed browsers
stream through the display’s token-gated view where vt= is required;
headless feeds apply the role whenever vt= is present.
Save the HTML
content returns a tab’s serialized DOM — rendered HTML by default,
format="text" for the text the page actually shows (script/style stripped).
Pass target_id for a specific tab (targets); omit it for the active tab.
Save the bytes
- Screenshots, PDFs, and download bytes come back base64 — decode before
writing to disk (the CLI writes files for you; cURL needs the
jq | base64 -dhop). - For anything visible but not downloadable — chart canvases, video frames — take a screenshot; PDF is for print-formatted output.