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

# Anam Video Avatar

> AnamVideoService generates real-time interactive Anam video avatars synchronized with your Pipecat agent's audio.

> [!NOTE]
>
> **Community-maintained integration.** This service is built and
> maintained by
> [anam-org](https://github.com/anam-org)
> . Pipecat does not test or officially support it. Please report issues and
> request changes on the
> [source repository](https://github.com/anam-org/pipecat-anam)
> . Learn more about
> [community integrations](https://docs.pipecat.ai/api-reference/server/services/community-integrations.md)
> .

## Overview

`AnamVideoService` generates real-time interactive video avatars for your
Pipecat agents using [Anam](https://anam.ai). It consumes TTS audio from your
pipeline and produces synchronized audio and video frames (`OutputImageRawFrame`
video and `SpeechOutputAudioRawFrame` audio) by wrapping Anam's Python SDK.

The package also ships an experimental `AnamTransport` — a drop-in replacement
for Pipecat's `DailyTransport` that publishes the avatar's audio and video
directly into a Daily room. See the
[source repository](https://github.com/anam-org/pipecat-anam) for details.

> [card] [Source Repository](https://github.com/anam-org/pipecat-anam)
>
> Source code, examples, and issues for the Anam integration

> [card] [PyPI Package](https://pypi.org/project/pipecat-anam/)
>
> The `pipecat-anam` package on PyPI

> [card] [Anam Lab](https://lab.anam.ai)
>
> Build and test your persona and get your `avatar_id`

> [card] [API Keys](https://lab.anam.ai)
>
> Create and manage your Anam API key

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-anam
```

You'll also need Pipecat with the services you use (STT, TTS, LLM, transport).

## Prerequisites

### Anam Account Setup

Before using the Anam video service, you need:

1. **Anam API Key**: Get one from [Anam Lab](https://lab.anam.ai)
2. **Avatar ID**: Build and test your persona in [Anam Lab](https://lab.anam.ai)
   to obtain your `avatar_id`

You'll also need API keys for the STT, TTS, and LLM services used in your
pipeline (e.g., Deepgram, Cartesia, Google).

### Required Environment Variables

* `ANAM_API_KEY`: Your Anam API key for authentication

## Configuration

Constructor parameters for `AnamVideoService`:

**api\_key** `str` *required*

Anam API key for authentication.

**persona\_config** `anam.PersonaConfig` *required*

Full persona configuration (e.g., `avatar_id`, `enable_audio_passthrough`).
Set `enable_audio_passthrough=True` to render the avatar directly from your
TTS audio.

**ice\_servers** `list[dict]` (default: None)

Custom ICE servers for WebRTC (optional).

**api\_base\_url** `str` (default: [https://api.anam.ai](https://api.anam.ai))

Base URL for the Anam API. Falls back to `https://api.anam.ai` when not set.

**api\_version** `str` (default: None)

Anam API version to use.

**enable\_session\_replay** `bool` (default: True)

Whether to enable session recording on Anam's backend.

> [!NOTE]
>
> See the [source repository](https://github.com/anam-org/pipecat-anam) for the
> authoritative, up-to-date list of parameters and the experimental
> `AnamTransport` options.

## Usage

```python theme={null}
import os

from anam import PersonaConfig
from pipecat_anam import AnamVideoService
from pipecat.frames.frames import LLMRunFrame
from pipecat.pipeline.pipeline import Pipeline

persona_config = PersonaConfig(
    avatar_id="your-avatar-id",
    enable_audio_passthrough=True,
)

anam = AnamVideoService(
    api_key=os.environ["ANAM_API_KEY"],
    persona_config=persona_config,
    api_base_url="https://api.anam.ai",
    api_version="v1",
    enable_session_replay=False,
)

pipeline = Pipeline([
    transport.input(),
    stt,
    context_aggregator.user(),
    llm,
    tts,
    anam,  # Video avatar (returns synchronized audio/video)
    transport.output(),
    context_aggregator.assistant(),
])
```

See the
[example](https://github.com/anam-org/pipecat-anam/blob/main/examples/video-avatar-anam-video-service.py)
in the source repository for a complete working pipeline.

## Compatibility

Tested with Pipecat v0.0.100+ (Python 3.10+). Check the [source
repository](https://github.com/anam-org/pipecat-anam) for the latest tested
version and changelog.


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