This page gives short answers that you can copy for common streams tasks. Each example assumes two steps: you imported from @clutchcall/sdk/streams (TS) or clutchcall.streams (Python), and you constructed a control-plane Streams client with baseUrl/apiKey/orgId.

Create a live input

A live input is the destination that an encoder or browser publishes into. Pick the ingest kind that your source uses.
The API returns the cleartext stream key only here. Store it immediately.

Build the RTMP / SRT publish endpoint

RTMP and SRT encoders ingest with the per-input stream key. The path segment is the input’s external_input_id.
Paste the RTMP URL + key into OBS (Settings → Stream → Custom) or into your hardware encoder. Then go live.

Go live from the browser with WHIP

WHIP is the WebRTC-HTTP ingest path. Capture the camera and POST an SDP offer. Create the input with ingest: "whip". Then publish with a standard WHIP client.

Publish a browser MediaStream over MoQT

The SDK’s BroadcastPublisher is a WHIP-style alternative. It fragments a MediaStream to CMAF and sends it over MoQT directly.

Upload a VOD file with TUS2 (resumable)

VOD uploads use TUS2, so large files survive network drops. Create the upload. PATCH chunks at the confirmed offset. On completion, the engine packages the file to CMAF.
streams.assets.* is Preview. Until the typed helper ships, call the TUS2 endpoint directly with the same bearer key.

Mint a signed playback URL

The playback URL carries a short-lived JWT. The relay checks it. The URL is the auth.

Play a live stream into a <video>

lv_* ids play live over MoQT. pb_* ids play VOD over HTTPS. The same viewer handles both.

Consume playback chunks headless (Python)

For server-side recording or re-muxing, take chunks via callback instead of a <video> element.

Read the catalog before playing

The catalog enumerates the available renditions so you can pick or label them.

Rotate a stream key

Rotation invalidates the old key immediately. It returns a fresh cleartext key.

Manage signing keys

Create a signing key (Ed25519 by default). Deactivate it later to revoke every token minted from it.

Re-mint before a long viewer expires

The server clamps playback tokens (≤ 24 h). For a long session, re-mint and re-open before expiresAt.

List live inputs

Page through the org’s inputs to render a dashboard.

Pull viewer analytics

The control-plane analytics surface exposes overview KPIs, viewer time-series, and glass-to-glass latency.
streams.analytics.* is Preview.