SDK ReferencePython SDK
Screenshots
API functions for the Screenshots resource.
For AI agents: https://bytekit.com/llms.txt — every docs page is available as markdown by appending .md
Screenshots
Functions for interacting with the screenshots API resource. Each operation ships in four forms — sync / sync_detailed and their async counterparts.
Create Screenshot
Capture a screenshot
Sync by default (holds up to 28s). Pass async: true in the body or ?async=true in the
query string to return 202 immediately; either one is enough, and false in one never
cancels true in the other.
Poll via GET /v1/screenshots/{id}.
Limits: request bodies are capped at 512 KB. An oversized body
returns a 400 with error code request_too_large.
Parameters
async_ (bool | Unset)body (ScreenshotRequest)url—strdevice—ScreenshotRequestDevice | Unsetviewport—None | Unset | Viewportasync_—bool | Unset— When true, the request returns 202 immediately and the screenshot is captured in the background; pollGET /v1/screenshots/\{id\}. The?async=truequery parameter is a second spelling of this field: the request is async when either one says true, andfalsein one never cancelstruein the other.full_page—bool | Unsetformat_—ScreenshotRequestFormat | Unsetquality—int | Unsetblock_ads—bool | Unsetblock_cookie_banners—bool | Unsetwait_until—ScreenshotRequestWaitUntil | Unsetwait_for_selector—None | str | Unsetdelay_ms—int | Unsetscroll—bool | Unsetclip—Clip | None | Unsetdark_mode—bool | Unsetdevice_scale_factor—None | ScreenshotRequestDeviceScaleFactorType1 | ScreenshotRequestDeviceScaleFactorType2Type1 | ScreenshotRequestDeviceScaleFactorType3Type1 | Unsetinclude_html—bool | Unsetcountry—str | Unsetlanguage—None | str | Unsetmetadata—Metadata | Unset— Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized.
Call styles
sync_detailed(client=client, body=body, async_=async_) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]
sync(client=client, body=body, async_=async_) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None
await asyncio_detailed(client=client, body=body, async_=async_) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]
await asyncio(client=client, body=body, async_=async_) -> Error | Error | ScreenshotResponse | ScreenshotResponse | NoneGet Screenshot
Get screenshot status
Parameters
id (str)
Call styles
sync_detailed(id=id, client=client) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]
sync(id=id, client=client) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None
await asyncio_detailed(id=id, client=client) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]
await asyncio(id=id, client=client) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None