Create Agora session
Starts a LemonSlice avatar session for Agora Conversational AI Engine. Agora’s generic avatar vendor calls this endpoint when you start an agent with LemonSlice configured as the avatar provider.
Authorizations
Your LemonSlice API token.
Body
Body for starting a LemonSlice Agora session. Exactly one of agent_id, agent_image_url, or agent_image_base64 must be provided.
Video codec used for the avatar stream. H264 provides the widest client compatibility.
H264, VP8 Agora RTC connection settings for the LemonSlice avatar participant. Populated by Agora when using the generic avatar vendor.
Pass in lemonslice for this field. The avatar's appearance is taken from agent_id, agent_image_url, or agent_image_base64.
"lemonslice"
The ID of a LemonSlice avatar. Exactly one of agent_id, agent_image_url, or agent_image_base64 is required. If provided, avatar-configured settings are used as defaults for agent_prompt and agent_idle_prompt.
"agent_abc123"
A publicly accessible URL to the avatar image. Exactly one of agent_id, agent_image_url, or agent_image_base64 is required.
"https://cdn.lemonslice.com/avatars/avatar.png"
Base64-encoded avatar image bytes. Exactly one of agent_id, agent_image_url, or agent_image_base64 is required.
Seconds of inactivity before the session is automatically terminated. Set to 0 to disable the idle timeout. We strongly discourage disabling the idle timeout during development to avoid excessive credit usage.
A high-level system prompt that subtly influences the avatar's movements, expressions, and emotional demeanor while speaking. Best used for general affect (for example, "feel excited" or "look sad") rather than precise actions.
A high-level system prompt that influences the avatar's movements, expressions, and emotional demeanor during the idle state.
Model variant. Leave unset to use the normal flagship model.
cwm-1, cwm-1-lite, cartoon, flash, pro, null Output aspect ratio for the avatar video.
2x3, 9x16, 1x1 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 promptly. This parameter enables completion detection when such events are missing or delayed.
Sample rate, in Hz, of the audio sent to LemonSlice. LemonSlice publishes its audio at the same rate.
16000, 24000 Boolean. If True, the source image is reframed before the session starts. Defaults to True for accounts created after September 22, 2026. See Avatar image tips.
Framing to generate when edit_image runs: standing (default), bust (default when using CWM), sitting, or portrait.
standing, bust, sitting, portrait, null Response
Session started successfully.
Unique identifier for this LemonSlice session.
WebSocket URL Agora uses for the avatar audio/video tunnel.
Token used to authenticate the WebSocket tunnel and session stop requests.
Public URL of the reframed image when editing produced or reused a variant. Omitted when editing is skipped or falls back to the original image.

