Skip to main content
POST
/
streams
/
{stream_id}
/
keepalive
Renew stream lease
curl --request POST \
  --url https://api.overshoot.ai/v1/streams/{stream_id}/keepalive \
  --header 'Authorization: Bearer <token>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expires_at_ms": 123,
  "ttl_seconds": 123,
  "publish": {
    "type": "livekit",
    "url": "<string>",
    "token": "<string>"
  },
  "stream_time_ms": 0
}

Documentation Index

Fetch the complete documentation index at: https://docs.overshoot.ai/llms.txt

Use this file to discover all available pages before exploring further.

When to call

Streams are reaped 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

All requests must include Authorization: Bearer <api_key>. Get a key from the Overshoot dashboard. Listing models (GET /models) does not require auth.

Path Parameters

stream_id
string<uuid>
required

UUID returned by POST /streams.

Response

Lease renewed.

id
string<uuid>
required

The stream's identifier (echoed back).

expires_at_ms
integer
required

New wall-clock Unix ms lease expiry, set to now + ttl_seconds.

ttl_seconds
integer
required

Lease TTL in seconds.

publish
object
required

WebRTC publish target. Connect with the LiveKit client SDK.

stream_time_ms
number
default:0

Current stream-clock position in ms (matches GET /streams/{id}).