Search documentation
Search pages, API reference sections, and guide headings.
Summary
Chat sessions provide an agentic retrieval surface on top of search results and prompt-run scope. The API supports session CRUD, turn creation, optional scope narrowing, and streaming turn events over SSE for agent-search experiences.
Chat endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /api/v2/chat/sessions | Create a session |
GET | /api/v2/chat/sessions | List sessions |
GET | /api/v2/chat/sessions/{session_id} | Retrieve one session with turns |
GET | /api/v2/chat/sessions/{session_id}/turns | List turns |
POST | /api/v2/chat/sessions/{session_id}/turns | Create a non-streaming turn |
POST | /api/v2/chat/sessions/{session_id}/turns/stream | Stream a turn over SSE |
DELETE | /api/v2/chat/sessions/{session_id} | Delete a session |
Scope model
Each turn can optionally narrow retrieval scope with:
index_idsprompt_run_ids
That scope is stored on the turn as effective_scope.
Example: create a session
curl -X POST /api/v2/chat/sessions \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{"title":"Daily review assistant"}'
Example: create a scoped turn
curl -X POST /api/v2/chat/sessions/session_123/turns \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"message": "Find scenes where a reporter appears outside a station entrance.",
"scope": {
"index_ids": ["idx_archive"],
"prompt_run_ids": ["run_123"]
},
"idempotency_key": "chat-turn-session-123-1"
}'
Streaming protocol
POST /api/v2/chat/sessions/{session_id}/turns/stream returns text/event-stream.
The DTO layer documents event families such as:
turn_startedturn_resumedagent_statetool_call_startedtool_call_resultturn_completederror
Use Idempotency-Key, X-Idempotency-Key, or the request-body idempotency_key when you need resumable turn behavior.
Response structure
Completed turns can include:
user_messageassistant_messageeffective_scopetool_traceresult_setsstats- terminal
errordetails when the turn fails
Use direct search endpoints when the client already knows the exact retrieval pattern. Use chat sessions when the operator needs iterative questioning, result review, and tool-trace visibility.
Related documentation
Search in VideoVector is built around segment-level prompt output, indexed media context, and scoped conversational retrieval. This page explains the major search modes and the field-path conventions they rely on.
The search API combines semantic retrieval, exact metadata filtering, cross-run search, playground search, and analyst-style SQL execution on run-backed tables.
This page groups the supported public endpoints that do not fit cleanly into a primary workflow resource page but are still part of the public non-billing API surface.
