> ## Documentation Index
> Fetch the complete documentation index at: https://lemonslice.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Build an AI companion avatar

> Give an AI companion or character app a real-time video face with LemonSlice: choosing a model, emotions, long sessions, live outfit and scene changes, and cost at consumer scale.

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](https://lemonslice.com/i/ai-companion-avatar).

## 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](https://lemonslice.com/docs/introduction/quickstart.md), or add the avatar to an existing agent with [LiveKit](https://lemonslice.com/docs/livekit/index.md), [Pipecat](https://lemonslice.com/docs/pipecat/index.md), [Agora](https://lemonslice.com/docs/agora/index.md) or a [WebSocket](https://lemonslice.com/docs/websocket/index.md).

Companions are often anime, cartoon, fantasy or stylized characters. Any single image works; see [avatar image tips](https://lemonslice.com/docs/prompting-guide/avatar-image-tips.md).

## Choose a model

| Model | Use it when | Availability |
| - | - | - |
| LemonSlice-2.1 | Default choice for photoreal and most stylized characters | All paid plans |
| [Cartoon](https://lemonslice.com/docs/reference/cartoon-model.md) | Animated, anime, animal and non-human characters | All paid plans |
| [CWM-1](https://lemonslice.com/docs/reference/cwm-1.md) | You want the character to show emotions and perform actions | Ultra and Enterprise |
| [CWM-1 Lite](https://lemonslice.com/docs/reference/lite-model.md) | High-volume consumer apps where cost per minute matters most (from about \$0.05/min) | Ultra and Enterprise |
| [Flash](https://lemonslice.com/docs/reference/flash-model.md) | Lowest latency | Ultra and Enterprise |

See [pricing](https://lemonslice.com/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](https://lemonslice.com/docs/reference/cwm-1.md) 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](https://lemonslice.com/docs/reference/cwm-1.md) 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](https://lemonslice.com/docs/reference/realtime-updates.md) 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](https://lemonslice.com/docs/reference/production-checklist.md#check-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](https://lemonslice.com/docs/agora/index.md) 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](mailto: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](https://lemonslice.com/docs/reference/production-checklist.md)).

## 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.