# Tavus (/en/ai/platform/models/avatar/tavus)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

> Documentation: Conversational AI.
> Documentation version: Preview.
> This document describes only this version. [Version index](/llms/doc-versions-convoai-guides-v2.txt).


Tavus provides lifelike AI avatars that see, hear, and respond in real time, enabling natural video conversations with your AI agents.

## Sample configuration

The following example shows how to configure Tavus as the agent's avatar when you create or update an agent. For a complete example, see [Create an agent and start a session](/en/ai/platform/get-started/start-stop-agent#create-an-agent).

Tavus supports BYOK only. It isn't available in managed mode. Store your Tavus API key in a secret set, and refer to it from the agent. For details, see [Use your own provider keys](/en/ai/platform/build/use-your-own-keys).

**Python SDK**

```python
from agora_agent import Agent, Tavus, secret_ref

# client is your configured Agora client
agent = (
    Agent(client=client)
    .with_stt(...)  # configure your ASR vendor
    .with_llm(...)  # configure your LLM vendor
    .with_tts(...)  # configure your TTS vendor
    .with_avatar(
        Tavus(
            api_key=secret_ref("support_prod", "tavus"),
            api_base_url="https://tavusapi.com/v2/conversations/agora",
            avatar_id="<tavus_face_id>",
            agora_uid="<avatar_rtc_uid>",
            agora_token="<avatar_rtc_token>",
        )
    )
)
```

**TypeScript SDK**

```ts
import { Agent, Tavus, secretRef } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(/* configure your ASR vendor */)
  .withLlm(/* configure your LLM vendor */)
  .withTts(/* configure your TTS vendor */)
  .withAvatar(
    new Tavus({
      apiKey: secretRef('support_prod', 'tavus'),
      apiBaseUrl: 'https://tavusapi.com/v2/conversations/agora',
      avatarId: '<tavus_face_id>',
      agoraUid: '<avatar_rtc_uid>',
      agoraToken: '<avatar_rtc_token>',
    }),
  );
```

**Go SDK**

```go
// client is your configured Agora client
agent := agentkit.NewAgent(client).
	WithStt( /* configure your ASR vendor */ ).
	WithLlm( /* configure your LLM vendor */ ).
	WithTts( /* configure your TTS vendor */ ).
	WithAvatar(vendors.NewTavus(vendors.TavusOptions{
		APIKey:     agentkit.SecretRef("support_prod", "tavus"),
		APIBaseURL: "https://tavusapi.com/v2/conversations/agora",
		AvatarID:   "<tavus_face_id>",
		AgoraUID:   "<avatar_rtc_uid>",
		AgoraToken: "<avatar_rtc_token>",
	}))
```

**REST API**

Add an `avatar` block to the `pipeline`. Tavus uses the `generic` avatar vendor. Set `credential.mode` to `byok` and `credential.fields.api_key` to the reference. In the following example, the key is stored as `tavus` in the `support_prod` set:

```json
"avatar": {
  "enabled": true,
  "credential": {
    "mode": "byok",
    "fields": {
      "api_key": "$secrets.support_prod.tavus"
    }
  },
  "vendor": "generic",
  "params": {
    "api_base_url": "https://tavusapi.com/v2/conversations/agora",
    "avatar_id": "<tavus_face_id>",
    "agora_token": "<avatar_rtc_token>",
    "agora_uid": "<avatar_rtc_uid>"
  }
}
```

## Key parameters

The `avatar` block takes the following fields. In the SDKs, `Tavus` sets them from its options, and passes any other parameters from its additional parameters option to `params`.

**avatar required**

**`enabled` (boolean) required**

Set to `true` to show the avatar.

**`vendor` (string) required**

Set to `generic`.

**`credential` (object) required**

Set `mode` to `byok` and `fields.api_key` to a `$secrets.<set>.<key>` reference to your Tavus API key. Get your API key from your Tavus account. For details, refer to [Tavus authentication](https://docs.tavus.io/api-reference/authentication).

**`params` (object) required**

**`api_base_url` (string) required**

The base URL of the Tavus API endpoint. Set to `https://tavusapi.com/v2/conversations/agora`.

**`avatar_id` (string) required**

The ID of the Tavus face (formerly called a replica) to render the avatar. Find or create a face in the [Tavus Developer Portal](https://maker.tavus.io/dev/faces).

**`agora_token` (string) optional**

The RTC token that authorizes the avatar to join the video channel. Generate this token using your Agora project credentials.

**`agora_uid` (string) required**

The unique identifier for the avatar's RTC connection. This must be different from other participants in the channel.

For more information about Tavus faces and conversations, refer to the [Tavus documentation](https://docs.tavus.io).

This integration is fully supported for use with the Conversational AI Platform. While it has completed functional validation, it is newer to the platform, and additional provider-specific edge cases may be identified as usage scales across a broader range of applications and workloads.
