What This Does: Creates and automatically starts a session with a video room where your avatar will appear. The session is immediately set to started status and a server is allocated to run the avatar.
Session Lifecycle: Creating a session automatically starts it. The session is created with started_at set to the current timestamp and a server is immediately allocated to run the avatar. You do not need to call a separate “Start Session” endpoint.
Video Room Integration: You must provide your own video room (Daily or LiveKit) configuration in the room parameter. The API will use this configuration to connect the avatar server to your video room.
Metadata Validation: The metadata field must be a valid JSON object (e.g., {"key": "value"}). Arrays, strings, numbers, booleans or null values will be rejected with a 400 error. If not provided, it defaults to an empty object {}.
Avatar Face Requirement: The avatar image must contain exactly one human face that is clearly visible and occupies a significant portion of the image. Group photos, full-body shots, illustrations or images with no face will be rejected with a 400 error. Use a portrait or head-and-shoulders photo for best results.
Creates a new session using the provided avatar (URL, base64 or avatar ID)
If a URL or avatar ID is provided, the image is fetched server-side, validated and resized (max 800px wide, JPEG at 85% quality) before being passed to the avatar processing pipeline — the URL must be publicly accessible
Avatar IDs (avat_xxx) are resolved to signed Cloudinary URLs; user_exclusive avatars are restricted to their owner
Face validation is run on every avatar image: the image must contain exactly one clearly visible human face that occupies a prominent portion of the frame — group photos, full-body shots or images with no face are rejected
Automatically starts the session (sets started_at timestamp)
Allocates a GPU-enabled server for avatar processing
Calculates expiration time based on your subscription plan’s session duration limits
Returns session_token needed for internal server authentication
Validates room platform is “daily” or “livekit”
Defaults aspect ratio to “4:3” if not provided, validates it’s one of: “4:3”, “3:4” or “1:1”
Metadata defaults to {} and must be a valid JSON object