Skip to main content
POST
Initiate Room
What This Does: Creates a LiveKit room and returns the WebSocket URL and a JWT token your client can use to join immediately. The avatar agent connects automatically when the client joins.

Body

All fields are optional. When omitted, server-side defaults are used.
string
Avatar ID to use for the session (e.g. avat_01KMZHXFPBVCXA5ATK85HCP8G1). Must be an avat_... ID returned by the Upload Face endpoint.
string
Video aspect ratio. Must be one of: 1:1, 4:3, 3:4. Defaults to 1:1.
string
ElevenLabs voice ID to use for TTS. Defaults to the server-configured voice.
boolean
Whether to enable real-time transcription of user speech. Defaults to true.

Response

boolean
true when the room was created successfully.
object
Room connection details.

How It Works

  1. A LiveKit room is created and configured with the options you provide.
  2. A client join token is generated.
  3. When the client connects using the returned url + token, the avatar agent starts automatically.
No separate session call needed. Unlike the /v1/sessions endpoint (which requires you to bring your own LiveKit room), this endpoint handles room creation for you. The avatar agent starts automatically on client join.

Client Integration