Skip to main content

HeyGen (Alpha)

HeyGen provides AI-powered avatars with high-quality video rendering and customizable video quality settings, enabling professional video conversations with your AI agents.

info

HeyGen avatars only support audio with a sample rate of 24,000 Hz. Using a TTS model configured with a different sample rate will result in an error. Ensure your TTS configuration matches this requirement.

Sample configuration

The following example shows a starting avatar parameter configuration you can use when you Start a conversational AI agent.


_13
"avatar": {
_13
"vendor": "heygen",
_13
"enable": true,
_13
"params": {
_13
"api_key": "<heygen_key>",
_13
"quality": "medium",
_13
"agora_uid": "<avatar_rtc_uid>",
_13
"agora_token": "<avatar_rtc_token>",
_13
"avatar_id": "",
_13
"disable_idle_timeout": false,
_13
"activity_idle_timeout": 60
_13
}
_13
}

Key parameters

paramsrequired
  • api_key stringrequired

    The API key used for authentication with HeyGen's services. Get your API key from the HeyGen console.

  • quality stringrequired

    Possible values: low, medium high

    The video quality for the avatar rendering.

    • "high" (720p)
    • "medium" (480p)
    • "low" (360p).

    Higher quality provides better visual experience but requires more bandwidth.

  • agora_uid stringrequired

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

  • agora_token stringrequired

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

  • avatar_id stringnullable

    The unique identifier for the HeyGen avatar you want to use.

  • disable_idle_timeout booleannullable

    Default: false

    Whether to disable the idle timeout feature.

  • activity_idle_timeout integernullable

    Default: 120

    The number of seconds of inactivity before the avatar session times out. Only applies when disable_idle_timeout is false.