Skip to content

cayu.browser_recording

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu import browser_recording_capability
browser_recording_capability(backend: str) -> BrowserRecordingCapability

Release source · Runtime guarantees · Capability guides

from cayu import BrowserRecordingCapability

Bases: _RecordingModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
backend str required
supported bool required
reason Literal['docker_sampled_active_page', 'lambda_microvm_control_relay', 'unsupported_backend'] required

Release source · Runtime guarantees · Capability guides

from cayu import BrowserRecordingConfig

Application-only capture credential; excluded from ordinary serialization.

Bases: _RecordingModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
policy BrowserRecordingPolicy required
session_id str Field(min_length=1, max_length=128)
guest_endpoint str Field(repr=False)
credential SecretStr Field(repr=False, exclude=True)
BrowserRecordingConfig.endpoint(value: str) -> str
BrowserRecordingConfig.token(value: SecretStr) -> SecretStr
BrowserRecordingConfig.private_guest_configuration() -> dict[str, object]

Only for Runtime’s private runner transport, never a tool argument.

Release source · Runtime guarantees · Capability guides

from cayu import BrowserRecordingGap

Bases: _RecordingModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
start_ms int Field(ge=0)
end_ms int Field(ge=0)
reason Literal['capture_gap', 'worker_lost'] 'capture_gap'

Release source · Runtime guarantees · Capability guides

from cayu import BrowserRecordingIdentity

Bases: _RecordingModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
session_id str Field(min_length=1, max_length=128)
session_instance_id str Field(min_length=1, max_length=128)
allocation_fingerprint str Field(pattern='^[0-9a-f]{64}$')
browser_id str Field(min_length=1, max_length=96, pattern='^[A-Za-z0-9_-]+$')
worker_instance str Field(min_length=1, max_length=96, pattern='^[A-Za-z0-9_-]+$')

Release source · Runtime guarantees · Capability guides

from cayu import BrowserRecordingManifest

Bases: _RecordingModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] 1
recording_id str required
scope str required
browser_id str required
worker_instance str required
identity BrowserRecordingIdentity required
gaps tuple[BrowserRecordingGap, ...] ()
status Literal['recording', 'complete', 'partial', 'unavailable', 'failed'] required
reason Literal['normal_close', 'capture_gap', 'limit_exhausted', 'worker_lost', 'storage_failure', 'recording'] required
video_sha256 str | None None
video_size_bytes int | None None
media_type Literal['video/webm'] 'video/webm'
started_at_ms int required
expires_at_ms int required
segments tuple[BrowserRecordingSegment, ...] ()

Release source · Runtime guarantees · Capability guides

from cayu import BrowserRecordingPolicy

Finite consent for sampled active-page video in fresh Docker browsers.

The application must explicitly authorize the session scope and origins. Cookies, imported profiles, sensitive takeover, child frames and opaque surfaces are excluded. Limits stop recording without retrying browser input.

Bases: _RecordingModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] 1
scope str Field(min_length=1, max_length=128, pattern='^[A-Za-z0-9_-]+$')
allowed_origins tuple[str, ...] Field(min_length=1, max_length=64)
allowed_profile_contexts tuple[Literal['fresh_temporary'], ...] ('fresh_temporary',)
allow_authenticated_pages Literal[False] False
capture_during_sensitive_entry Literal[False] False
capture Literal['active_page_viewport'] 'active_page_viewport'
max_duration_seconds int Field(default=300, strict=True, ge=1, le=3600)
max_bytes int Field(default=32 * 1024 * 1024, strict=True, ge=4096, le=256 * 1024 * 1024)
max_width int Field(default=1280, strict=True, ge=16, le=1920)
max_height int Field(default=720, strict=True, ge=16, le=1080)
frames_per_second int Field(default=2, strict=True, ge=1, le=5)
retention_seconds int Field(strict=True, ge=60, le=30 * 86400)
BrowserRecordingPolicy.origins(value: tuple[str, ...]) -> tuple[str, ...]
BrowserRecordingPolicy.exclusion(value: object) -> bool
BrowserRecordingPolicy.contexts(value: tuple[str, ...]) -> tuple[str, ...]

Release source · Runtime guarantees · Capability guides

from cayu import BrowserRecordingSegment

Bases: _RecordingModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
sequence int Field(strict=True, ge=0, le=18000)
page_id str Field(min_length=1, max_length=96, pattern='^[A-Za-z0-9_-]+$')
elapsed_ms int Field(strict=True, ge=0, le=3600000)
duration_ms int Field(strict=True, ge=1, le=1000)
sha256 str Field(pattern='^[0-9a-f]{64}$')
size_bytes int Field(strict=True, ge=1)
media_type Literal['video/webm'] 'video/webm'

Release source · Runtime guarantees · Capability guides