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

# ChatFX Avatar Video Avatar

> ChatFXVideoService gives your Pipecat bot a real-time, lip-synced ChatFX Avatar face that speaks your TTS output.

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

## Overview

`ChatFXVideoService` gives your bot a real-time talking face from
[ChatFX Avatar](https://chatfx.com/avatar/). Put it right after your TTS
service: it sends each reply's audio to the avatar, and the avatar's face and
voice, rendered together so the lips match, come back into your pipeline as
the bot's own video (`OutputImageRawFrame`) and audio
(`SpeechOutputAudioRawFrame`). You keep your own STT, LLM and TTS.

Use it with any Pipecat transport that supports audio and video output. Behind
the scenes, the avatar and your bot meet in a private Daily room in your own
Daily account, created for each call and deleted when it ends (the same way
Pipecat's Tavus service connects).

* **Waiting picture:** until the live face arrives (a few seconds), the bot's
  video shows the avatar's still picture.
* **Face first:** the bot's first words wait up to 10 seconds for the face, so
  the greeting comes with it.
* **Interruptions:** on `InterruptionFrame`, the avatar stops mid-word.
* **Never blocks the call:** if the avatar can't start or leaves mid-call, the
  bot carries on with its own TTS voice.
* **Billing stops with the pipeline:** ending or cancelling the pipeline ends
  the avatar session.

> [card] [Source Repository](https://github.com/ChatRep/pipecat-chatfx)
>
> Source code, the foundational example, and issues

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

> [card] [ChatFX Avatar Pipecat Guide](https://chatfx.com/support/avatar-pipecat/)
>
> Step-by-step setup and how the integration works

> [card] [ChatFX Avatar](https://avatar.chatfx.com)
>
> Choose or build an avatar and create API keys

## Installation

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

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

It brings `pipecat-ai[daily]`. Install the extras for your transport and AI
services separately.

## Prerequisites

### ChatFX Avatar Account Setup

Before using the ChatFX Avatar video service, you need:

1. **ChatFX Avatar API key**: sign up at [avatar.chatfx.com](https://avatar.chatfx.com)
   and create a key under **API keys**
2. **Avatar ID**: pick a ready-made avatar or build your own on the
   **Avatars** page, and copy its ID (for example `chatfx-lois`)
3. **Daily API key**: from your [Daily dashboard](https://dashboard.daily.co/developers).
   On Pipecat Cloud you already have one.

You'll also need API keys for the STT, LLM and TTS services used in your
pipeline.

### Required Environment Variables

* `CHATFX_AVATAR_API_KEY`: Your ChatFX Avatar API key
* `DAILY_API_KEY`: Your Daily API key (the private room for each call is
  created in your account)

## Configuration

Constructor parameters for `ChatFXVideoService`:

**avatar\_id** `str` *required*

ID of the avatar to show, from the Avatars page.

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

ChatFX Avatar API key. Defaults to `CHATFX_AVATAR_API_KEY`.

**daily\_api\_key** `str` (default: None)

Daily API key used to create and delete the call's private room. Defaults to
`DAILY_API_KEY`.

**face\_first\_seconds** `float` (default: 10.0)

How long the bot's first words wait for the live face.

**start\_timeout** `float` (default: 120.0)

How long to keep trying to start the avatar before the bot carries on with
its own voice.

**waiting\_picture** `bool` (default: True)

Show the avatar's still picture until the live face arrives.

**waiting\_text** `str` (default: Video starting...)

Text on the waiting picture, in your language. `None` shows no text.

**api\_url** `str` (default: [https://api.chatfx.com](https://api.chatfx.com))

ChatFX Avatar API URL. Most users can omit this.

The service has no runtime settings. If the avatar can't start (for example a
wrong key or no minutes left), `avatar.failure` holds a `ChatFXException` with
the API's error `code`.

> [!NOTE]
>
> For the latest examples and configuration options, see the [source
> repository](https://github.com/ChatRep/pipecat-chatfx).

## Usage

### Basic Setup

Add `ChatFXVideoService` after your TTS service, and turn on your transport's
video output at the avatar's size (912 x 512 landscape, 512 x 512 square, or
384 x 512 portrait):

```python theme={null}
from pipecat.pipeline.pipeline import Pipeline
from pipecat.transports.daily.transport import DailyParams
from pipecat_chatfx import ChatFXVideoService

# Reads CHATFX_AVATAR_API_KEY and DAILY_API_KEY from the environment
avatar = ChatFXVideoService(avatar_id="chatfx-lois")

params = DailyParams(
    audio_in_enabled=True,
    audio_out_enabled=True,
    video_out_enabled=True,
    video_out_is_live=True,
    video_out_width=912,
    video_out_height=512,
    video_out_framerate=25,
)

pipeline = Pipeline([
    transport.input(),
    stt,
    user_aggregator,
    llm,
    tts,
    avatar,  # Avatar face and voice (emits synchronized video and audio)
    transport.output(),
    assistant_aggregator,
])
```

Your client shows the bot's video as usual: the avatar is the bot.

> [!NOTE]
>
> Use the Daily transport for local testing and production. With SmallWebRTC,
> the browser shows the avatar's lips about a third of a second behind its
> voice.

See the
[foundational example](https://github.com/ChatRep/pipecat-chatfx/blob/main/examples/bot.py)
in the source repository for a complete bot with Deepgram, OpenAI and
Cartesia (`uv run bot.py -t daily`).

## Compatibility

Tested with Pipecat v1.15.0 and v1.16.0 (Python 3.12). Requires Pipecat 1.8.0
or newer. Check the [source repository](https://github.com/ChatRep/pipecat-chatfx)
for the latest tested version and changelog.


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