SDK ReferenceTypeScript SDK

Screenshots

Capture full-page or viewport screenshots.

Screenshots

Capture full-page or viewport screenshots. Accessed via client.screenshots.

create

client.screenshots.create(opts: ScreenshotCreateRequest): Promise<ScreenshotCreateResponse>

POST /v1/screenshots — capture a screenshot

get

client.screenshots.get(id: ScreenshotId): Promise<ScreenshotGetResponse>

GET /v1/screenshots/{id} — poll a screenshot by ID.

A terminal-failed screenshot returns the Error envelope on a 200 (issue #2027), so narrow the result before reading image_url.