Troupeby AliveDocsSign in

Reference

media

Screenshots and screen recordings. Index · shared schemas · errors.

ProcedureSummaryRESTMCP toolStability
media.screenshotCapture the screen, or one element's frame (MCP returns image content)POSTmedia_screenshotstable
media.startRecordingStart an MP4 recording of the device streamPOST—stable
media.stopRecordingStop a recording and return the filePOST—stable

media.screenshot

Capture the screen, or one element's frame (MCP returns image content)

RESTPOST /v1/media/screenshot (input as a JSON body)
RPC/rpc/v2/media/screenshot
MCPtool media_screenshot; hints: read-only, idempotent
Authdevices:read
Tenancyproject
Requiresmedia.screenshot
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  format?: 'png' | 'jpeg'  // default 'png'
  quality?: integer  // 1–100
  target?: Target
}

Output: a binary body, image/png or image/jpeg (the raw response body with its Content-Type).

Errors: S, DEVICE_MEDIA_FAILED, LOCATOR_NOT_FOUND, LOCATOR_STRICT_VIOLATION, LOCATOR_REF_STALE.

Named types: SessionId, Target.

media.startRecording

Start an MP4 recording of the device stream

RESTPOST /v1/media/start-recording (input as a JSON body)
RPC/rpc/v2/media/startRecording
MCPnot a tool (part of the recording flow, which returns a file); hints: none
Authdevices:read
Tenancyproject
Requiresmedia.recording
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  maxDurationMs?: integer  // default 600000; 1000–3600000
}

Output:

TypeScript
{ recordingId: RecordingId; startedAt: string }

Errors: S, CONFLICT, DEVICE_MEDIA_FAILED.

Named types: RecordingId, SessionId.

media.stopRecording

Stop a recording and return the file

RESTPOST /v1/media/stop-recording (input as a JSON body)
RPC/rpc/v2/media/stopRecording
MCPnot a tool (part of the recording flow, which returns a file); hints: none
Authdevices:read
Tenancyproject
Requiresmedia.recording
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId; recordingId: RecordingId }

Output:

TypeScript
{ recordingId: RecordingId; durationMs: number; file: FileRef }

Errors: S, DEVICE_MEDIA_FAILED.

Named types: FileRef, RecordingId, SessionId.

esc

    Type to search every page, the protocol reference and the cloud API.