Create session
Creates a new LemonSlice session that takes in avatar audio and publishes synchronized video/audio to the specified transport.
Authorizations
Your LemonSlice API token.
Body
The properties used to create a session. Use application/json to reference an agent_id or agent_image_url, or multipart/form-data to upload an image file directly.
- LiveKit SDK
- Pipecat SDK
- WebSocket + LiveKit
- WebSocket + Daily
Using the LiveKit SDK publishes avatar A/V to a LiveKit room.
"livekit"LiveKit room credentials LemonSlice uses to join and publish avatar A/V.
A URL to an avatar image to use. The image should be 368x560 pixels. LemonSlice automatically center-crops images that do not match the expected dimensions. Provide either agent_image_url or agent_id, but not both.
"https://cdn.lemonslice.com/avatars/avatar.png"
The ID of a LemonSlice avatar. Provide either agent_id or agent_image_url, but not both. If provided, avatar-configured settings are used as defaults for agent_prompt, agent_idle_prompt, and idle_timeout.
"agent_abc123"
A high-level system prompt that subtly influences the avatar's movements, expressions, and emotional demeanor. This prompt is best used to suggest general affect or demeanor (for example, 'feel excited' or 'look sad') rather than precise or deterministic actions.
A high-level system prompt that influences the avatar's movements, expressions, and emotional demeanor during the idle state.
Idle timeout in seconds. If a negative number is provided, the session will have no idle timeout.
Time in seconds to wait without receiving new audio bytes before marking the response as complete. Some TTS models do not send an end response event, or do not send it in a timely manner. This parameter enables detection of response completion when such events are missing or delayed. This parameter can also be used to ensure proper conversation flow with multi-message LLMs (e.g. gpt-realtime-2).
Output aspect ratio for the avatar video.
2x3, 9x16, 1x1 Model variant. Leave null to use the normal flagship model.
lite, flash, pro, null Enable WebRTC simulcast, which publishes multiple resolutions of the avatar video so subscribers receive the best quality their bandwidth allows.

