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
modulesaltogether → 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
face_pose_detection: head orientation
face_pose_detection: head orientation
Detects head turns away from centre.Classes:
Looking Left, Looking Rightemotion_recognition: expression classification
emotion_recognition: expression classification
Classifies the participant’s facial expression each second.Classes:
angry, sad, disgust, fear, happy, surprise, neutraleyegaze_tracking: pupil direction
eyegaze_tracking: pupil direction
Independent of head pose: catches subtle off-screen glances.Classes:
Looking left, Looking rightface_count: number of visible faces
face_count: number of visible faces
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"face_out_of_focus: participant left the frame
face_out_of_focus: participant left the frame
Fires when the target participant’s face moves out of the camera view.Classes:
out_of_frameMinimum 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: yourcallback_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 yourcallback_url:
LiveKit data channel
Hawkeye also publishes each event into the room viapublish_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:
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.