oxDocs
Browse documentation
Introduction
Vision API

Get started

Quickstart
Inference API
Realtime
Integrations
LiveKit & SIP
Administration
Reference

Get started

Quickstart

Create a live video stream and ask a model about its latest retained frame.

Set the Vision API origin

The live-stream API is available under the versioned preview namespace on the same portal origin. Use a Hallikar preview API key supplied with Vision API access. The stable Ox inference and Realtime APIs remain under /v1; do not interchange their credentials with a Hallikar preview key.

bash

export OX_VISION_API_BASE_URL=https://www.amerint.co/v1beta
export HALLIKAR_API_KEY='[YOUR_HALLIKAR_API_KEY]'

Verify the model catalog

The model catalog is public and is the cheapest end-to-end connectivity check. Choose only a model whose status is ready.

bash

curl --fail-with-body "$OX_VISION_API_BASE_URL/models" \
  --header "Accept: application/json"

Create a live stream

An empty JSON object creates a managed LiveKit stream. The response contains the stream ID and a short-lived, publish-only LiveKit token. Publish video with the LiveKit SDK, wait until stream status reports a first frame, and then reference that stream from Chat Completion.

bash

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

Ask about the latest frame

Replace STREAM_ID and MODEL_ID with values returned by the API. The hallikar:// URL is resolved inside Hallikar and is never fetched from the public internet.

bash

curl --fail-with-body "$OX_VISION_API_BASE_URL/chat/completions" \
  --request POST \
  --header "Authorization: Bearer $HALLIKAR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"model":"MODEL_ID","messages":[{"role":"user","content":[{"type":"text","text":"What is happening now?"},{"type":"image_url","image_url":{"url":"hallikar://streams/STREAM_ID?frame_index=-1"}}]}],"max_completion_tokens":128}'
Help improve this guideFound something unclear or incomplete?
Report an issue ↗View source ↗