Conversation sessions and rendering
How LiveKit starts a conversation, connects the renderer, and releases resources.
Editor previews, standalone players at /s/{slug}, and embedded players at
/embed/{slug} use LiveKit for conversations. The browser receives scoped
connection parameters. Model settings, system instructions, and tool
credentials stay on the server.
Start a conversation
To start a published session, Studio checks whether the publication is active, verifies the caller's origin, and applies its concurrency and daily quotas. It pins the published revision and starts the dialogue worker. Depending on the experience, the worker uses a realtime speech model, an STT → LLM → TTS pipeline, or Just AI.
Microphone audio, text, interruptions, and transcripts travel through the
session. When a publication reaches its starts-per-minute limit, Studio returns
429 publication_rate_limited with Retry-After: 60. The previous browser
conversation endpoints return 410 livekit_required.
Render the character
- Cloud 3D with LegendStream. Studio allocates the renderer selected by the
publication's
renderer_id. A server-side bridge forwards speech to LegendStream for lip sync and returns the finished video and audio. If all renderer slots are busy, the player shows the queue position. The session returns503if the bridge is disabled. - Browser-rendered 2D and VRM. The browser renders the character with
@avatarstudio/mesh-avataror@avatarstudio/vrm-avatar. It receives speech audio and applies lip sync, expressions, and gestures locally. These characters use no LegendStream slot or cloud GPU.
End a session or change guests
Closing the tab, calling destroy() on the Embed SDK instance, or reaching
the session time limit initiates cleanup. Studio releases the room and any
LegendStream slot. The quota stays reserved until cleanup is confirmed. The
client can retry closing with the same token.
In a standard embed, reset() disconnects and creates a new session. A kiosk
that sends visitId and visitGeneration can use reset() or endVisit()
to clear the conversation context while keeping the room and renderer ready
for the next guest. See the host-page bridge for the
visit protocol.