Billing starts when the session reaches
ready, including time between calls. Disconnect when the
caller is done. See Billing for how session time maps to rates.At a glance
What you can do
Create and reuse an avatar
Create an avatar from one image. Save its
avatar_id and attach it again in later sessions.Talk or type
Publish a microphone or send text with
say. Read transcript messages to show both sides of
the conversation.Steer a live call
Use
interrupt to stop speech. Use update_call to change the persona or voice. Send reference
images to change what the character holds, wears, or stands in front of.Quick start
These examples use the base SDK to create an avatar and start a call. The tutorial shows how to publish a microphone and build the rest of the call UI.In a browser, start
startAvatarCall from a click or tap so the browser can play audio.How a call works
- Connect. The first
session_statehas phaseidle. All four tracks exist from connect, so the app can prepare its player and microphone before a call starts. - Create or reuse an avatar. Send
create_avatarwith an upload or a public image URL. The phase changes topreparing_avatar, thenavatar_ready. Save theavatar_id. In a later session, sendattach_avatarwith that id instead. - Start a call. Send
start_callwith a persona. You can choose a voice fromlist_voicesor use the default. The phase changes throughstartingandwarming_uptolive. - Talk and steer. Publish
micor sendsay. Useinterruptandupdate_callto steer a live conversation. Useset_reference_imagesto change what the avatar wears, holds, or stands in front of. - End or start again. Send
end_call, or let the call end at its time limit or idle timeout. The avatar stays available, so the app can start another call in the same session.
session_state to drive the UI. The snapshot reports the phase, current avatar, call timers, and
media state. A refused command or failure arrives as command_error with a stable code.
See the schema for commands, messages, and tracks. The
prompt guide covers personas, greetings, and
turn-taking.