Renew stream lease
Streams
Keepalive
Renews the stream lease and returns a fresh publish token. Clients should renew
before the 5-minute lease expires, for example every 4 minutes, and pass the
returned token to the LiveKit SDK with room.updateToken(...).
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_msset tonow + 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(matchesGET /streams/{id}).
Authorizations
Every public HTTP request requires Authorization: Bearer <api_key>, except
GET /models and the public /billing/pricing endpoints.
401means the key is missing, unknown, or revoked.403means the key is valid but cannot access the requested resource.- The publish token returned by
POST /streamsis only for publishing media to LiveKit. It does not replace the API key for HTTP calls.
Headers
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
UUID returned by POST /streams.