본문으로 건너뛰기

Stream scenes as they finish analysis (NDJSON)

GET 

/api/v1/videos/:video_id/scenes/stream

Push each scene's analysis as soon as its caption is ready, without waiting for the whole video to finish indexing. NDJSON like /v1/ads/match — one JSON object per line:

  • {"event": "scene", "scene": {...}} — a newly analyzed scene (same shape as GET /v1/videos/{video_id}/scenes items, never repeated)
  • {"event": "keepalive"} — sent when idle; ignore
  • {"event": "done", "job_status": "done", ...} — indexing finished (job_status may also be failed, or null for a video without an indexing job); the connection closes after this line
  • {"event": "timeout"} — server-side max stream duration reached; reconnect for a fresh snapshot

Connecting to an already-indexed video replays all scenes immediately and closes with done. Scene order follows analysis completion, not necessarily scene_index. An unknown video_id returns 404. If the connection ends without a terminal line (done/timeout) — e.g. an intermediary dropped it — simply reconnect; already-analyzed scenes replay first.

Request​

Responses​

Successful Response