- Endpoint:
POST https://api.heygen.com/v3/avatars - Purpose: Create a new avatar from a video (digital twin), a photo, or an AI prompt. Returns an
avatar_item(the look) and anavatar_group(the character identity). The look ID is what you pass asavatar_idwhen creating videos.
Authentication
| Header | Value |
|---|---|
X-Api-Key | Your HeyGen API key |
Authorization | Bearer YOUR_ACCESS_TOKEN (OAuth) |
Digital Twin
Create an avatar from video footage. The speaker in the video becomes a reusable digital twin.| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "video". |
name | string | Yes | Display name for the avatar. |
file | object | Yes | Training video. { "type": "url", "url": "..." }, { "type": "asset_id", "asset_id": "..." }, or { "type": "base64", "media_type": "video/mp4", "data": "..." }. |
avatar_group_id | string | No | Attach to an existing character identity. Omit to create a new one. |
Photo Avatar
Create an avatar from a single photo. Quick to set up — no video recording needed.| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "photo". |
name | string | Yes | Display name for the avatar. |
file | object | Yes | Photo image. Same format options as digital twin file. |
avatar_group_id | string | No | Attach to an existing character identity. Omit to create a new one. |
Response
Both types return the same shape:| Field | Type | Description |
|---|---|---|
avatar_item.id | string | The look ID — pass this as avatar_id to POST /v3/videos. |
avatar_item.avatar_type | string | "video_avatar" (digital twin) or "photo_avatar". |
avatar_item.group_id | string | The character identity this look belongs to. |
avatar_group.id | string | Group ID. Use to add more looks or initiate consent. |
avatar_group.consent_status | string or null | null means consent is not required. Otherwise check the consent flow below. |
Avatar Consent
- Endpoint:
POST https://api.heygen.com/v3/avatars/{group_id}/consent - Purpose: Initiate a consent flow for an avatar group. Returns a URL the avatar subject must visit to approve usage. Required for digital twins before the avatar can be used in video generation.
Quick Example
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
reroute_url | string | No | Redirect URL after the subject completes consent. Defaults to HeyGen’s own completion page. |
Response
| Field | Type | Description |
|---|---|---|
url | string | Consent page URL. Send this to the avatar subject to complete approval. |
avatar_group.consent_status | string | Current consent status (e.g. "pending"). |
consent_status on the avatar group (via GET /v3/avatars/{group_id}) to know when consent is complete.
Avatars vs Looks
An avatar group is a character identity (e.g. “Sarah”). Each group can have multiple looks — different outfits, poses, or styles. When creating a video, you pass a look ID (not a group ID) as theavatar_id. Use GET /v3/avatars/looks to browse looks, or pass avatar_group_id when creating a new avatar to add a look to an existing character.
