Skip to main content
LemonSlice is a real-time interactive avatar API. In a companion app, it turns your character’s image into a live, lip-synced video avatar that talks, listens and reacts. Your app keeps its own LLM, persona, memory, safety rules and voice; LemonSlice adds the face. This guide covers the choices that matter most for companion and character apps. For background, see AI companion avatars.

Architecture

Use the same pipeline as any LemonSlice voice agent: speech-to-text, your LLM (with persona and memory), text-to-speech, then LemonSlice for video. Start from the quickstart, or add the avatar to an existing agent with LiveKit, Pipecat, Agora or a WebSocket. Companions are often anime, cartoon, fantasy or stylized characters. Any single image works; see avatar image tips.

Choose a model

See pricing for plan details.

Add emotions and actions

Companions feel more alive when they react. With CWM-1 or CWM-1 Lite, set action_engine="natural" and the Action Machine picks contextually appropriate actions and emotions automatically. On LiveKit, publish the user’s speaking state so the character also reacts while listening. For story moments (a laugh, a wave, a surprised look), trigger specific actions yourself from your companion’s state. See CWM-1 for automatic, LLM-driven and manual control.

Change outfits and scenes mid-call

Companion apps often let users change the character’s look or move the story to a new place. Real-time avatar updates swap the reference image during a call in about 600 ms. Call it from an LLM tool (for example, “change into your rain jacket”), from your backend, or from a user upload.

Plan for long sessions

Companion conversations can be long and quiet at times. Check these timeouts before launch:
  • Idle timeout ends a session when the avatar has not spoken for a while. On LiveKit, Pipecat and WebSocket sessions it is set with idle_timeout, which defaults to your avatar’s configured idle timeout when you pass agent_id and to 60 seconds otherwise; on Agora it defaults to 120 seconds and is set with activity_idle_timeout. Raise it for conversations with long pauses, and end sessions yourself so you don’t pay for stale calls.
  • GPU timeout (default 30 minutes) caps session length. Contact support@lemonslice.com for multi-hour sessions.

Keep costs predictable

Video minutes cost more than text or voice. Common patterns in companion apps:
  • Offer video as a premium mode, and keep text and voice-only chat for quick check-ins.
  • Cap video minutes per user per day.
  • Use CWM-1 Lite for high-volume tiers.
  • End sessions as soon as the user leaves (listen for disconnects as described in the production checklist).

Safety

Content policies, age checks and moderation belong in your LLM layer, before text reaches TTS and the avatar. Tell users they are talking to an AI.