Overview
A Session represents a single conversation with an AI avatar. Each session includes configuration for video streaming and tracks the lifecycle from creation to completion. Session Lifecycle:- Created → Session initialized (automatically started)
- Started → Session active with video room allocated
- Ended → Session completed, resources released
Fields
Unique session identifier (starts with
sess_)Session status:
created, started or endedcreated- Session initialized but not yet runningstarted- Session is active and the avatar server is runningended- Session completed and resources released
ISO 8601 timestamp when session started (null before start)
ISO 8601 timestamp when session ended (null if still active)
Session access token for streaming (only returned in create response)
ISO 8601 timestamp when session will automatically expire based on plan limits
Video aspect ratio:
4:3, 3:4 or 1:1Session duration in seconds. For active sessions, calculated in real-time. For ended sessions, total duration.
Custom metadata object (empty object
{} if not provided). Can store any valid JSON data.Billing information (only present for ended sessions)
Status Values
| Status | Description |
|---|---|
created | Session initialized, server not yet allocated |
started | Session is running with an active avatar server |
ended | Session completed, resources released |
Session Expiration
Theexpiration field indicates when the session will automatically end based on your subscription plan’s time limits.
Example
Created Session
Ended Session
The
billing object is only included for ended sessions. It contains information about how many minutes were consumed and whether they came from the plan allowance or purchased packages. You can manage your plan and purchase additional minutes at app.agenthuman.com/settings/billing.