Get a session transcript
AgentSessionSummary for a single voice session, including the entire conversation transcript.
| Auth | JWT bearer or X-API-Key (see API Keys) |
| Scoping | Staff see any session. All other callers see only sessions for AI characters they created. |
| Path param | session_id (UUID) returned at session start |
Response
Wrapped in the standard envelope ({ success, message, data, errors }). The data field contains:
Transcript shape
transcript is an ordered array — index 0 is the first utterance, increasing over time.
| Field | Type | Description |
|---|---|---|
role | string | "user" or "assistant". Tool calls / system messages are excluded. |
text | string | The exact text — STT output for user turns, LLM output for assistant turns. |
turn_index | number | 0-based turn counter within the session. |
ts | number | Seconds since the session started. Useful for syncing to the recording. |
transcript_text is the same data flattened into a single string — convenient for previews, search indexing, or feeding back into an LLM as context.
Field reference
| Field | Description |
|---|---|
session_id | The same UUID returned from POST /api/agents/agent-session/. |
tenant_id / character_slug | Which tenant and character this session belonged to. |
user | User ID that owned the session (if authenticated). |
room_name | LiveKit room name — useful for correlating with LiveKit dashboard logs. |
origin_url | The page URL that initiated the call. |
metadata | Whatever you passed at session start (user_id, plan, etc.). |
session_duration_seconds | Wall-clock length of the call. |
turn_count | Total turns (user + assistant). |
interruption_count | Times the user spoke over the agent. |
llm_*, stt_*, tts_* | Token / audio / character usage for cost accounting. |
estimated_cost_usd | Sum of LLM + STT + TTS costs based on provider unit prices. |
recording_url | S3 URI of the call recording (private). |
recording_presigned_url | Time-limited HTTPS URL that anyone can play. Refresh by re-fetching this endpoint. |
finalized_at | When the worker finalized the session (post-call). null for in-progress sessions. |
Errors
| Status | Cause |
|---|---|
400 Bad Request | session_id is not a valid UUID |
401 Unauthorized | Missing / expired JWT, or invalid / inactive X-API-Key |
404 Not Found | Session doesn’t exist or the caller doesn’t own the character that ran the session. Treated the same to avoid leaking session IDs across tenants. |
Common patterns
Get transcript only
Stream the recording while showing the transcript
Index transcripts into your own search system
Related
- List sessions for a character → Session History
- Mint the
session_idin the first place → Sessions - Form submissions tied to a session → Form Responses
