Skip to main content

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

string
Unique session identifier (starts with sess_)
string
Session status: created, started or ended
  • created - Session initialized but not yet running
  • started - Session is active and the avatar server is running
  • ended - Session completed and resources released
string
ISO 8601 timestamp when session started (null before start)
string | null
ISO 8601 timestamp when session ended (null if still active)
string
Session access token for streaming (only returned in create response)
string | null
ISO 8601 timestamp when session will automatically expire based on plan limits
string
Video aspect ratio: 4:3, 3:4 or 1:1
number | null
Session duration in seconds. For active sessions, calculated in real-time. For ended sessions, total duration.
object
Custom metadata object (empty object {} if not provided). Can store any valid JSON data.
object | null
Billing information (only present for ended sessions)

Status Values

Session Expiration

The expiration 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.