Playground key
create a key →

DroidHub developer platform

Realtime camera streams, controllable from your app.

DroidHub carries the video and enforces who is allowed to control a robot — your backend decides who that is and when. Build a Twitch-style experience with a control queue, a fleet console, or a pay-to-drive arcade: the queue and business logic live in your code, the single-controller guarantee lives in ours.

Streams, stream keys, the controller, access tokens and webhooks are all in the API. API keys and team members are managed in the dashboard. Every reference page here has live, runnable examples: paste a key into the bar at the top and the Send buttons hit the real API as your backend would.

Concepts

  • Stream — a robot's realtime room, with up to eight cameras. Created in the dashboard or via the Streams API. One DroidHub stream maps to exactly one media room.
  • Stream key (dh_sk_…) — the device credential. Your camera/robot exchanges it for a short-lived connection token. Shown once at creation; rotate it any time.
  • API key (dh_api_…) — the backend credential, sent as Authorization: Bearer. Scoped to your organisation and to the scopes you select.
  • Access tokens — short-lived (15 min) credentials your backend mints for your end-users (viewers and the controller). Their browsers connect directly to the DroidHub media edge with them.
  • The single-controller invariant: at most one of your end-users can send control input at a time, enforced at the media server. Reassigning cuts the previous controller off mid-session. What it covers.
  • E-stop and safety: an e-stop that holds until cleared, control that ends when the controller disconnects or goes quiet, and room state your robot reads to stop on its own. Safety.

How the pieces fit

Your backend holds the API key and never ships it to a browser. It mints per-user access tokens and decides who controls. Devices hold only their stream key. End-users only ever receive short-lived tokens.

data flow
  device (camera/robot)            your backend                 end-user browser
  ───────────────────             ────────────                 ────────────────
  dh_sk_…  ──exchange──▶  POST /v1/streams/token
                          (no API key; key IS the cred)
                                   │
                                   ▼
                          dh_api_…  ──────────▶  POST /v1/streams/:id/tokens
                          (Authorization: Bearer)        mint viewer/controller
                                   │                             │
                                   ▼                             ▼
                          POST /v1/streams/:id/controller   token + url ──▶ connect
                          (promote one identity)                to media edge

Base URL

All endpoints live under https://platform.droidhub.cloud/api. Responses are JSON; errors use { "error": { "code", "message" } }. Call it from your backend: responses carry no CORS headers, so browsers can't call it directly. The Send buttons in these docs call the production API with your key.

Where to go next

  • Streams — create streams, rotate keys, read session history.
  • Access tokens — mint viewer/controller tokens and exchange device stream keys.
  • Control — assign and revoke the single controller.
  • Webhooks — subscribe to stream/controller events and verify signatures.
  • Safety — the e-stop, control timeouts, max lag and what your robot does.
  • Recipe: control queue — a full audience-controlled-robot walkthrough.