# Anam (/en/ai/models/avatar/anam)

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

Anam provides AI-powered avatars with real-time video rendering, enabling natural video conversations with your AI agents.

<CalloutContainer type="info">
  <CalloutTitle>
    Info
  </CalloutTitle>

  <CalloutDescription>
    This integration is fully supported for use with Conversational AI Engine. 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.
  </CalloutDescription>
</CalloutContainer>

### Sample configuration [#sample-configuration]

The following examples show how to configure an Anam avatar when starting a conversational AI agent.

<Tabs defaultValue="python" groupId="ai-sdk-language">
  <TabsList>
    <TabsTrigger value="python">
      Python SDK
    </TabsTrigger>

    <TabsTrigger value="typescript">
      TypeScript SDK
    </TabsTrigger>

    <TabsTrigger value="go">
      Go SDK
    </TabsTrigger>

    <TabsTrigger value="rest-api">
      REST API
    </TabsTrigger>
  </TabsList>

  <TabsContent value="python">
    ```python
    from agora_agent import Agent
    from agora_agent.agentkit.vendors import AnamAvatar

    # client is your configured Agora client
    agent = (
        Agent(client)
        .with_stt(...)  # configure your STT vendor
        .with_llm(...)  # configure your LLM vendor
        .with_tts(...)  # configure your TTS vendor
        .with_avatar(AnamAvatar(
            api_key='your-anam-key',
            persona_id='<anam_persona_id>',
        ))
    )
    ```
  </TabsContent>

  <TabsContent value="typescript">
    ```typescript
    import { Agent, AnamAvatar } from 'agora-agents';

    // client is your configured Agora client
    const agent = new Agent({ client })
      .withStt(/* configure your STT vendor */)
      .withLlm(/* configure your LLM vendor */)
      .withTts(/* configure your TTS vendor */)
      .withAvatar(new AnamAvatar({
        apiKey: 'your-anam-key',
        personaId: '<anam_persona_id>',
      }));
    ```
  </TabsContent>

  <TabsContent value="go">
    ```go
    import "github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"

    // client is your configured Agora client
    agent := agentkit.NewAgent(client).WithStt(/* configure your STT vendor */).
      WithLlm(/* configure your LLM vendor */).
      WithTts(/* configure your TTS vendor */).
      WithAvatar(
        vendors.NewAnamAvatar(vendors.AnamAvatarOptions{
            APIKey:    "your-anam-key",
            PersonaID: "<anam_persona_id>",
        }),
    )
    ```
  </TabsContent>

  <TabsContent value="rest-api">
    Use the following `avatar` configuration in your request:

    ```json
    "avatar": {
      "vendor": "anam",
      "enable": true,
      "params": {
        "api_key": "<anam_key>",
        "avatar_id": "960f614f-ea88-47c3-9883-f02094f70874",
        "agora_uid": "<avatar_rtc_uid>",
        "agora_token": "<avatar_rtc_token>",
        "sample_rate": 24000,
        "quality": "high",
        "video_encoding": "H264"
      }
    }
    ```
  </TabsContent>
</Tabs>

### Key parameters [#key-parameters]

<ParameterList title="params" required="true">
  <Parameter name="api_key" type="string" required="true">
    The API key used for authentication with Anam's services. Get your API key from the Anam console.
  </Parameter>

  <Parameter name="avatar_id" type="string" required="true">
    The unique identifier for the Anam avatar you want to use.
  </Parameter>

  <Parameter name="agora_uid" type="string" required="true">
    The unique identifier for the avatar's RTC connection. This must be different from other participants in the channel.
  </Parameter>

  <Parameter name="agora_token" type="string" required="true">
    The RTC token that authorizes the avatar to join the video channel. Generate this token using your Agora project credentials.
  </Parameter>

  <Parameter name="sample_rate" type="number" defaultValue="24000" possibleValues="16000, 24000, 48000" required="false">
    The audio sample rate in Hz.
  </Parameter>

  <Parameter name="quality" type="string" defaultValue="high" possibleValues="high, medium, low" required="false">
    The video quality level.
  </Parameter>

  <Parameter name="video_encoding" type="string" defaultValue="H264" possibleValues="H264, AV1" required="false">
    The video encoding format.
  </Parameter>
</ParameterList>
