Skip to main content
POST /v2/vision starts a new Hawkeye session on a LiveKit room you already have. Hawkeye joins as a subscriber, analyses the target participant’s video, and pushes an event every time a class is detected: to your callback URL and into the LiveKit room itself over the data channel.
Billing is a flat 1¢ per minute per session. Sessions stop automatically once max_duration (in minutes) is reached.

Endpoint

Request

For each module, you only pick the classes you care about. Everything else (evaluation frequency, thresholds) is set to sensible defaults server-side.

Top-level fields

Rules of thumb

  • Skip modules altogether → Hawkeye runs every module with every default class.
  • Include a module with an empty list ("emotion_recognition": []) → that module runs with its full default class list.
  • Include a module with specific classes → only those classes emit alerts. Any unknown class name is rejected with 400.
When you set participant to a specific identity, it must match the LiveKit identity the participant joined with (not their display name). If that participant hasn’t joined yet, Hawkeye waits: if they never appear, the session idles until max_duration fires.

Modules & Classes

Detects head turns away from centre.Classes: Looking Left, Looking Right
Classifies the participant’s facial expression each second.Classes: angry, sad, disgust, fear, happy, surprise, neutral
Independent of head pose: catches subtle off-screen glances.Classes: Looking left, Looking right
Counts distinct faces in the frame. The class name is the exact face count you want to alert on.Classes: any numeric string, e.g. "2", "3", "4"
Fires when the target participant’s face moves out of the camera view.Classes: out_of_frame

Minimum viable payload

Everything defaulted: all modules, all classes:

Only a couple of modules

Just watch emotions and face count:

Response

Event Delivery

Every event is delivered over two channels: your callback_url (if you provided one) and the LiveKit room’s data channel (always on). The event details are the same on both, so you can consume whichever fits your setup: or both.

WebSocket callback

When a class is detected, Hawkeye pushes a JSON message to your callback_url:

LiveKit data channel

Hawkeye also publishes each event into the room via publish_data with reliable=True, on the hawkeye-events topic. Any client in the room receives it through its SDK’s data-received event: filter on the hawkeye-events topic and decode the JSON payload:
The type field identifies the event kind, and payload contains the same fields as the WebSocket callback. Data-channel delivery is best-effort: if a publish fails, Hawkeye logs the error and carries on, without interrupting analysis or the WebSocket callback. Use these events to drive dashboards, escalate to a moderator, or feed downstream analytics. Hawkeye handles the vision, you handle the reaction.

What’s Next?

Get Session Status

Poll a running session, or check the final state after it ends.

Overview

What Vision Understanding does and when to use it.