Skip to main content
Check out our hosted Daily starter project to see how you can connect your LemonSlice-managed avatar to a Daily room in a simple web app.

Getting Started

Follow these steps to create a Daily room that your LemonSlice avatar joins, and embed it into your application.

1. Get your API key

Retrieve your API key from the LemonSlice developers page. All API requests must include this header:

2. Create a room

Use the POST /liveai/rooms endpoint to create a Daily room configured with a LemonSlice avatar. The avatar will automatically join the room once its startup is complete.
BASH

3. Join the room from your frontend

Use Daily’s JavaScript SDK to join the room with the URL and token returned by the API.
JAVASCRIPT
Once joined, the LemonSlice avatar will connect and begin responding in the room.

4. Listen for LemonSlice events

LemonSlice uses Daily’s app-message channel to push events about the avatar, image updates, and errors.
Example event handler
JAVASCRIPT

You’re ready to build

With a room created, the avatar connected, and event hooks wired up, you’re ready to:
  • Build interactive video AI apps
  • Customize avatar behavior
  • Trigger image changes and respond to events
Explore the rest of the API docs for more capabilities.

Receiving Events

Hook into the Daily event handler to get LemonSlice-specific events.

Full event handler

JAVASCRIPT

Control Events

Send events through Daily to control the LemonSlice avatar.

Sending Events

JAVASCRIPT

Avatar image changes with /imagine

The chat-msg control event also supports avatar image updates using a special /imagine prefix.
When a message begins with /imagine, LemonSlice interprets the remainder of the message as an image prompt and updates the avatar accordingly.
Example
JAVASCRIPT
How it works
  • Messages starting with /imagine do not trigger a spoken response
  • Instead, the avatar image is regenerated based on the prompt
  • The avatar retains its core identity and proportions, while updating the visual context
  • Once the image update completes, the avatar continues normal interaction
    Avatar setup requirement: Allow users to modify appearance must be enabled in the avatar configuration. This setting is enabled by default for all newly created avatars.

Additional resources

Starter project

REST Endpoints

Daily Documentation