API reference
Streams.
A stream is a robot's realtime room: up to eight cameras, the robot, and the people watching and driving it. These endpoints cover the full lifecycle: create, read, rename, choose what HLS records, rotate the device key, inspect session history, and delete. Every stream is scoped to the API key's organisation.
Stream object
{
"id": "V1StGXR8_Z5jdHi6B-myT",
"orgId": "…",
"name": "Lobby rover",
"slug": "lobby-rover",
"status": "live", // offline | live | ended
"livekitRoomName": "dh_V1StGXR8_Z5jdHi6B-myT",
"hlsPlaybackUrl": "https://…/live.m3u8", // the main camera's
"hls": "main", // off | main | all, see Cameras and HLS
"cameras": [
{
"name": "main",
"status": "live", // live | offline
"identity": "camera_V1StGXR8_Z5jdHi6B-myT",
"recording": true,
"hlsPlaybackUrl": "https://…/live.m3u8",
"connectedAt": "2026-06-12T09:31:04.000Z",
"disconnectedAt": null
}
],
"keyIssuedAt": "2026-06-12T09:30:00.000Z", // null for keys issued before Dec 2026
"createdAt": "2026-06-12T09:30:00.000Z",
"updatedAt": "2026-06-12T09:31:04.000Z"
}Status
offline: created, not live yet.live: a camera connected.ended: the room closed after every participant left. A robot or viewer still connected keeps the stream live.
Cameras and HLS
A stream takes up to eight cameras; a ninth is refused. Each device exchanges the stream key with its own camera name (see device token exchange). A camera that gives no name is the main camera. cameras lists the cameras of the current or last session, main first.
hls decides which cameras are recorded to HLS: off, main (the default) or all. Each recorded camera has its own hlsPlaybackUrl: the live playlist while it publishes, and the full recording (index.m3u8) once the session ends. The stream's own hlsPlaybackUrl is the main camera's.
Each camera connection records its own playlist, so a URL changes when its camera reconnects or a new session starts. Earlier playlists aren't listed. A change to hls applies at once: cameras it no longer covers stop recording and their live playlist URLs are cleared (finished recordings keep theirs), and cameras it now covers start. Sending the same value again restarts any covered recording that isn't running.
hls says. Each camera's name is in its participant metadata as camera.List streams
Returns the organisation's streams, newest first, as { streams: [...] }. Each stream carries its cameras and its safety object.
Create a stream
Creates a stream and returns its one-time stream key alongside the object: { stream, streamKey }. The dh_sk_… key is shown only here — store it on the device now.
| Body | Type | Description |
|---|---|---|
| namerequired | string | Display name, 1–120 chars. |
| slug | string | Optional URL slug (lowercase letters, numbers, dashes). Derived from name when omitted. |
| hls | string | off, main (default) or all: which cameras are recorded to HLS. |
Get a stream
Full detail plus the current controller (or null): enough to render a complete stream page.
{
"stream": { "id": "…", "status": "live", "hls": "main", "cameras": [ … ], … },
"controller": {
"identity": "operator-jane",
"assignmentId": "…",
"assignedBy": "api",
"createdAt": "…"
},
"safety": {
"estop": null, // { at, reason, by } while an e-stop holds
"controlTimeoutMs": null,
"maxLagMs": null,
"lastRevoke": { "identity": "…", "reason": "disconnected", "at": "…" }
}
}Update a stream
Updates the display name, what HLS records and the safety policy. Send only the fields you change; null turns a policy off.
| Body | Type | Description |
|---|---|---|
| name | string | New display name, 1–120 chars. |
| hls | string | off, main or all. Applies to the cameras already live. |
| controlTimeoutMs | integer | null | 200–10000. Controller silence before robots stop and control is revoked. |
| maxLagMs | integer | null | 50–10000. Longest round trip robots drive with. |
Session history
One entry per live period, newest first. endedAt is null while a session is still live. egressId is the main camera's HLS recording job in progress, if any, and is usually cleared once that camera disconnects.
{
"sessions": [
{ "id": "…", "startedAt": "…", "endedAt": "…", "egressId": "EG_…" }
]
}Rotate the stream key
Issues a fresh dh_sk_… key and invalidates the old one immediately — re-pair your devices afterwards. The new key is returned exactly once.
Delete a stream
Deletes the stream, its sessions and its controller history. Recordings already on the CDN stay at their URLs. Returns { ok: true }, or 404 if it doesn't exist in your org.