Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.heygen.com/llms.txt

Use this file to discover all available pages before exploring further.

Creation Methods

Digital Twin (type: "digital_twin")

Create an avatar from video footage. The speaker in the video becomes a reusable digital twin.
curl -X POST "https://api.heygen.com/v3/avatars" \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "digital_twin",
    "name": "My Digital Twin",
    "file": { "type": "url", "url": "https://example.com/training-footage.mp4" }
  }'
ParameterTypeRequiredDescription
typestringYesMust be "digital_twin".
namestringYesDisplay name for the avatar.
fileobjectYesTraining video. { "type": "url", "url": "..." }, { "type": "asset_id", "asset_id": "..." }, or { "type": "base64", "media_type": "video/mp4", "data": "..." }.
avatar_group_idstringNoAttach to an existing character identity. Omit to create a new one.

Response

All three creation types return the same response shape:
{
  "data": {
    "avatar_item": {
      "id": "look_abc123",
      "name": "Space Commander",
      "avatar_type": "studio_avatar",
      "group_id": "group_xyz789",
      "preview_image_url": "https://files.heygen.ai/...",
      "supported_api_engines": ["avatar_4_quality", "avatar_4_turbo"],
      "tags": []
    },
    "avatar_group": {
      "id": "group_xyz789",
      "name": "Space Commander",
      "looks_count": 1,
      "consent_status": null,
      "created_at": 1717000000
    }
  }
}
FieldTypeDescription
avatar_item.idstringThe look ID — pass this as avatar_id to POST /v3/videos.
avatar_item.avatar_typestring"digital_twin", "photo_avatar", or "studio_avatar".
avatar_item.supported_api_enginesarrayEngine values compatible with this look for POST /v3/videos.
avatar_item.group_idstringThe character identity this look belongs to.
avatar_group.idstringGroup ID. Use to add more looks or initiate consent.
avatar_group.consent_statusstring or nullnull for photo and prompt avatars. Digital twins may require consent — see below.
Initiate a consent flow for an avatar group. Returns a URL the avatar subject must visit to approve usage.
Endpoint: POST https://api.heygen.com/v3/avatars/{group_id}/consent
Consent is only required for digital twin avatars (type: "digital_twin"). Photo avatars and prompt-to-avatar characters do not require consent.

Request

curl -X POST "https://api.heygen.com/v3/avatars/group_xyz789/consent" \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reroute_url": "https://heygen.com/consent-done"
  }'
ParameterTypeRequiredDescription
reroute_urlstringNoRedirect URL after the subject completes consent. Defaults to HeyGen’s own completion page.

Response

{
  "data": {
    "avatar_group": {
      "id": "group_xyz789",
      "name": "My Digital Twin",
      "consent_status": "pending",
      "looks_count": 1,
      "created_at": 1717000000
    },
    "url": "https://heygen.com/consent/abc123..."
  }
}
FieldTypeDescription
urlstringConsent page URL. Send this to the avatar subject to complete approval.
avatar_group.consent_statusstringCurrent consent status (e.g. "pending").
Check 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 the avatar_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.