Overview
With the HeyGen v2 API, you can create videos using different types of avatars.
Creating Videos with HeyGen API
This guide covers:
- Photo Avatars (Custom images)
- Public Avatars (HeyGen studio avatars)
- Instant Avatars / Digital Twin (Your own generated avatar)
You can choose which engine to use (avatar III or avatar IV) depending on your needs.
1. Photo Avatars
Photo Avatars let you generate videos from a static image.
Step 1: Get Photo Avatar ID
If you already have a Photo Avatar ID, skip this step. Otherwise:
- Avatar Group: Call List All Avatar Groups to retrieve avatar groups.
- Avatar Look: Call List All Avatars in One Avatar Group to choose a look.
- Each look has a unique
id, used astalking_photo_id.
- Each look has a unique
Step 2: Create Video
Call Video Generation API:
- Set
character.typetotalking_photo. - Provide
talking_photo_id.
You can use either the
avatar IIIoravatar IVengine depending on desired quality or features.
2. Public Avatars
Public Avatars are HeyGen’s prebuilt avatars.
Step 1: List Avatars and Voices
- Avatars: Call List All Avatars (V2) and choose a
avatar_id. - Voices: Call List All Voices (V2) and choose a
voice_id.
Step 2: Create Video
You can proceed from this point by following the instructions on the Video Generation page or Create a WebM Video Page. The process remains the same - just ensure that you update the avatar_id and voice_id fields with the values you've obtained.
3. Instant Avatars / Digital Twin
Instant Avatars are custom avatars you generate through HeyGen. They are sometimes referred to as Digital Twin because they are fully animated.
Step 1: Generate an Instant Avatar
- Create your avatar on the Create Instant Avatar page.
- Assign a name during creation.
Step 2: Generate a Custom Voice (Optional)
- Go to the Voices page.
- Options:
- Instant Voice Cloning – clone an existing voice from an audio file.
- Generate Voice – create a new voice from text.
Step 3: Get IDs
- Use List All Avatars (V2) to find your Instant Avatar
avatar_id. - Use List All Voices (V2) to get your custom
voice_id.
Step 4: Create Video
You can proceed from this point by following the instructions on the Video Generation page or Create a WebM Video Page. The process remains the same - just ensure that you update the avatar_id and voice_id fields with the values you've obtained.
4. Choosing an Engine
| Avatar Type | Supported Engine(s) | Notes |
|---|---|---|
| Photo Avatar | III, IV | Depends on quality/features required |
| Public Avatar | III, IV | Studio avatars, ready-to-use |
| Instant Avatar / Digital Twin | III, IV | Supports full video animation, custom voice |
Updated 1 day ago