oxDocs
Browse documentation
Introduction
Vision API

Get started

Quickstart
Inference API
Realtime
Integrations
LiveKit & SIP
Administration
Reference

Core API

The Stream

Create, inspect, renew, preview, and delete a leased live-video stream.

Understand the lifecycle

A stream is an owned, leased live-video resource. POST /streams creates it, GET /streams/{id} reports frame availability, POST /streams/{id}/keepalive renews its lease, and DELETE /streams/{id} ends it. There is no public pause, resume, list-all, or /infer endpoint in the current contract.

MethodPathPurpose
POST/streamsCreate a managed, pull, or customer-LiveKit stream.
GET/streams/{id}Read state, frame counters, timing, source type, and lease expiry.
POST/streams/{id}/keepaliveRenew the lease and refresh any managed publish token.
POST/streams/{id}/viewer-tokenMint a short-lived, subscribe-only LiveKit token.
GET/streams/{id}/previewReturn a bounded frame or clip preview as JPEG data URLs.
DELETE/streams/{id}End the stream and release live resources.

Wait for usable frames

Poll status until first_frame_at_ms is non-null. recent_fps describes the current capture cadence, retained_frame_count counts frames still available for inference, and evicted_frame_count counts frames that left the ten-minute history window. Frame indices are lifetime indices, not positions inside the retained window.

bash

curl --fail-with-body "$OX_VISION_API_BASE_URL/streams/STREAM_ID" \
  --header "Authorization: Bearer $HALLIKAR_API_KEY"

Renew and delete explicitly

The current lease is five minutes. Renew around every four minutes and use the returned replacement publish token for managed LiveKit streams. Delete a stream when capture ends; do not wait for expiry as a normal cleanup path.

bash

curl --fail-with-body "$OX_VISION_API_BASE_URL/streams/STREAM_ID/keepalive" \
  --request POST \
  --header "Authorization: Bearer $HALLIKAR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{}'

curl --fail-with-body "$OX_VISION_API_BASE_URL/streams/STREAM_ID" \
  --request DELETE \
  --header "Authorization: Bearer $HALLIKAR_API_KEY"
Help improve this guideFound something unclear or incomplete?
Report an issue ↗View source ↗