Skip to main content

Capture a full screenshot

The default storage mode is inline. The returned Screenshot can contain raw bytes, base64 data, or an artifact URI. Use screenshot.as_bytes() when the payload is inline.

Capture a region

Use full_bytes() or region_bytes() when you only need encoded image bytes:

Store a screenshot as an artifact

Artifact storage changes daemon state. Keep artifact URIs out of logs because they can reveal run details.

Record the desktop

Always stop a recording before you terminate its Sandbox. This lets ffmpeg finish the file.

Inspect and remove recordings

Recording methods use the recording id. A recording name is optional metadata and is not a route identifier.