Skip to main content
POST
Renew stream lease

When to call

Streams expire 5 minutes after the last keepalive (or creation, if no keepalive has happened yet). Call /keepalive every ~2 minutes — clock skew is real and the cost of a missed renewal is the whole stream. A keepalive on a stream that’s already ended returns 404. Streams cannot be revived; create a new one.

What you get back

Every successful keepalive returns:
  • A new expires_at_ms set to now + ttl_seconds.
  • A fresh LiveKit publish.token. Save it — if your publisher disconnects from the room, you’ll need a current token to rejoin without recreating the stream. Old tokens may stop working.
  • The current stream_time_ms (matches GET /streams/{id}).

Authorizations

Authorization
string
header
required

Every public HTTP request requires Authorization: Bearer <api_key>, except GET /models and the public /billing/pricing endpoints.

  • 401 means the key is missing, unknown, or revoked.
  • 403 means the key is valid but cannot access the requested resource.
  • The publish token returned by POST /streams is only for publishing media to LiveKit. It does not replace the API key for HTTP calls.

Headers

X-Overshoot-Region
enum<string>

Optional hint to route the request to the region that owns the stream. If the request reaches the wrong region the API returns 409 with a region_error body.

Available options:
us-west1,
us-central1

Path Parameters

stream_id
string<uuid>
required

UUID returned by POST /streams.

Response

Lease renewed.

id
string<uuid>
required
expires_at_ms
integer
required
ttl_seconds
integer
required
Example:

300

publish
object
required

WebRTC publish target. Connect with the LiveKit client SDK.

stream_time_ms
number

Current stream-clock position in ms.