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

# Avatar Integration

> Add a managed photorealistic avatar from Anam or Simli to your agent.

The quickest way to add a face is a managed avatar provider. Construct the avatar and pass it
to the pipeline's `avatar` slot; the SDK streams the agent's speech to the provider, which
renders a lip-synced video track into the room.

## Anam

Set your Anam credentials, then construct `AnamAvatar`:

```bash theme={null}
export ANAM_API_KEY=<key>
```

<CodeGroup>
  ```python title="Python" Python theme={null}
  from zeroruntime.plugins import AnamAvatar
  from zeroruntime.inference import AICousticsDenoise

  avatar = AnamAvatar(
      avatar_id="<avatar-id>",   # falls back to ANAM_AVATAR_ID / a default
  )

  pipeline = Pipeline(
      stt=DeepgramSTT(), llm=OpenAILLM(), tts=ElevenLabsTTS(),
      vad=SileroVAD(), turn_detector=TurnDetector(model="echo-large"),
      avatar=avatar,
      denoise=AICousticsDenoise(model_id="quail-vf-2.2-l-16khz"),
  )
  ```

  ```typescript title="Node JS" Node JS theme={null}
  import { AnamAvatar } from '@zeroruntime/js-sdk/plugins';
  import { AICousticsDenoise } from '@zeroruntime/js-sdk/inference';

  const avatar = AnamAvatar({
    avatar_id: '<avatar-id>',  // falls back to ANAM_AVATAR_ID / a default
  });

  const pipeline = Pipeline({
    stt: DeepgramSTT(), llm: OpenAILLM(), tts: ElevenLabsTTS(),
    vad: SileroVAD(), turn_detector: TurnDetector({ model: 'echo-large' }),
    avatar,
    denoise: AICousticsDenoise({ model_id: 'quail-vf-2.2-l-16khz' }),
  });
  ```
</CodeGroup>

| Parameter      | Type  | Default   | Description                                           |
| :------------- | :---- | :-------- | :---------------------------------------------------- |
| `api_key`      | `str` | `None`    | Anam API key. Falls back to `ANAM_API_KEY`.           |
| `avatar_id`    | `str` | a default | The avatar to render. Falls back to `ANAM_AVATAR_ID`. |
| `persona_name` | `str` | `None`    | Optional persona name for the avatar.                 |
| `voice_id`     | `str` | `None`    | Optional voice override for the avatar.               |

## Simli

Set your Simli credentials, then construct `SimliAvatar` with the face to render:

```bash theme={null}
export SIMLI_API_KEY=<key>
```

<CodeGroup>
  ```python title="Python" Python theme={null}
  from zeroruntime.plugins import SimliAvatar
  from zeroruntime.inference import AICousticsDenoise

  avatar = SimliAvatar(
      face_id="<face-id>",   # falls back to SIMLI_FACE_ID / a default
  )

  pipeline = Pipeline(
      stt=DeepgramSTT(), llm=OpenAILLM(), tts=ElevenLabsTTS(),
      vad=SileroVAD(), turn_detector=TurnDetector(model="echo-large"),
      avatar=avatar,
      denoise=AICousticsDenoise(model_id="quail-vf-2.2-l-16khz"),
  )
  ```

  ```typescript title="Node JS" Node JS theme={null}
  import { SimliAvatar } from '@zeroruntime/js-sdk/plugins';
  import { AICousticsDenoise } from '@zeroruntime/js-sdk/inference';

  const avatar = SimliAvatar({
    config: { faceId: '<face-id>' },  // Simli's own config object carries the face
  });

  const pipeline = Pipeline({
    stt: DeepgramSTT(), llm: OpenAILLM(), tts: ElevenLabsTTS(),
    vad: SileroVAD(), turn_detector: TurnDetector({ model: 'echo-large' }),
    avatar,
    denoise: AICousticsDenoise({ model_id: 'quail-vf-2.2-l-16khz' }),
  });
  ```
</CodeGroup>

| Parameter    | Type   | Default   | Description                                             |
| :----------- | :----- | :-------- | :------------------------------------------------------ |
| `api_key`    | `str`  | `None`    | Simli API key. Falls back to `SIMLI_API_KEY`.           |
| `face_id`    | `str`  | a default | The face to render. Falls back to `SIMLI_FACE_ID`.      |
| `model`      | `str`  | `None`    | Optional Simli model override.                          |
| `is_trinity` | `bool` | `False`   | Set when the face ID is a Trinity avatar, to keep sync. |
