Skip to main content
POST
Create Avatar

Authorizations

x-api-key
string
header
required

HeyGen API key. Obtain from your HeyGen dashboard.

Headers

Idempotency-Key
string

Optional client-supplied key for safely retrying mutations. Subsequent calls within 24 hours that share this key replay the original response — even if the request body differs slightly (a warning is logged). A retry that arrives while the original is still in flight gets a 409 request_in_progress. Keys must be 1–255 characters from [A-Za-z0-9_:.-]; a UUID is a safe default. Scope is per-endpoint and per-resource: the same key on a different route or path parameter is independent.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body

application/json

Discriminated union for POST /v3/avatars request body.

type
string
required

Must be 'prompt' for AI-generated avatars.

Allowed value: "prompt"
name
string
required

Name of the avatar.

prompt
string
required

Prompt for avatar generation.

Maximum string length: 1000
reference_images
(AssetUrl · object | AssetId · object | AssetBase64 · object)[] | null

Reference images — each as {"type": "url", "url": "https://..."} or {"type": "asset_id", "asset_id": "..."}. Max 3.

Maximum array length: 3

Asset input via publicly accessible HTTPS URL.

avatar_group_id
string | null

Optional identity (group) to save the generated avatar to. By default a new identity is created. If avatar_id is also provided, it must belong to this group.

avatar_id
string | null

Optional avatar id to use as the visual reference for the generation. When provided without avatar_group_id, the new avatar is saved to the referenced avatar's group; when provided with avatar_group_id, the avatar must belong to that group and the result is saved there. The referenced avatar must exist and have a usable image, otherwise the request is rejected.

Response

Successful response

data
CreateAvatarResponse · object