AI Ask
Create Session
Create an AI Ask session, optionally answering a first message
POST
Create a conversation session. A session’s scope is set at creation and is immutable — it determines what the conversation can draw on:
recording— a single recording (its full transcript is used). Passrecording_id; the session’s end user is the recording’s owner.library— all of the end user’s recordings, via retrieval (RAG).selected— a chosen set of recordings, via retrieval.
initial_message to create the session and answer the first turn in one call, or omit it to create an empty session and ask later with Send Message.
Authentication
Requires an API key. Provideend_user_id in the body for library / selected scopes unless the API key is itself scoped to an end user. For recording scope the end user is derived from the recording.
Request Body
Conversation scope. Set once at creation and immutable. A discriminated union on
type:{ "type": "recording", "recording_id": "rec_..." }{ "type": "library" }{ "type": "selected", "recording_ids": ["rec_...", "rec_..."] }
folder is reserved and not yet supported.)An optional first message. When present, the session is created and this message is answered in the same call (the response is the ask result below); when absent, an empty session is returned. Same shape as the body of Send Message:
content(string, required) — the user’s question, 1–10000 characters.provider(string, optional) — LLM provider (gemini,openai, orclaude); defaults to the project/system default.context_refs(array, optional) — @mentioned recordings,[{ "type": "recording", "id": "rec_..." }](max 20). Reserved for upcoming features; persisted today.
Session title (1–200 characters). Defaults to the
initial_message text, or "New chat".End user the session belongs to (
eu_*). Required for library / selected scope unless the API key is end-user-scoped. For library scope this is also the retrieval boundary.Response
- With
initial_message→200, the ask result ({ session_id, message, sources }) — see Send Message for the full message shape. - Without
initial_message→201, the empty session object.
When
initial_message is present, the user message is persisted before the model is called, so on an LLM failure (502) you can safely retry against the returned session_id. Oversized single-recording transcripts return 413; use a library / selected scope instead.
