Create Video
Creates a video from a HeyGen avatar or an arbitrary image. Supports scripts or pre-recorded audio for lip-sync. Supports the Avatar III, Avatar IV, and Avatar V engines; set the ‘engine’ field to select. Avatar IV is used by default when ‘engine’ is omitted.
Authorizations
HeyGen API key. Obtain from your HeyGen dashboard.
Headers
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.
1 - 255^[A-Za-z0-9_\-:.]{1,255}$Body
- CreateVideoFromAvatar
- CreateVideoFromImage
- CreateVideoFromCinematicAvatar
Create a video from a HeyGen avatar (video or photo avatar).
Provide an avatar_id to use a previously created avatar. Supports all
avatar types: studio_avatar, digital_twin, and photo_avatar. Optionally
set engine to select Avatar V for eligible avatars; when omitted, the
server defaults to Avatar IV.
Must be 'avatar' for avatar-based video creation.
"avatar"HeyGen avatar ID (video avatar or photo avatar look ID).
Display title for the video in the HeyGen dashboard.
Output video resolution.
4k, 1080p, 720p Output video aspect ratio. Supported values: '16:9', '9:16', '4:5', '5:4', '1:1', 'auto'. Defaults to '16:9'. 'auto' preserves the source's aspect ratio (avatar source frames or uploaded image), short-edge anchored to the requested resolution and capped at the tier's long edge. Falls back to '16:9' when source dimensions can't be read.
16:9, 9:16, 4:5, 5:4, 1:1, auto How the subject is fitted to the output canvas. 'cover' scales to fill the frame (may crop edges). 'contain' scales to fit entirely within the frame (may show background). When omitted, the server picks the best option based on the source and canvas orientations.
contain, cover Background settings for the video.
Remove the avatar background. Video avatars must be trained with matting enabled.
Webhook URL to receive a POST notification when the video is ready.
Caller-defined identifier echoed back in the webhook payload.
Custom watermark image to overlay on the video (PNG or JPEG). Available as a premium option for select Enterprise customers. To request access, please contact our support team.
Caption generation settings. A sidecar subtitle file is always returned via subtitle_url; set 'style' to additionally burn captions into the rendered video.
Output container. 'webm' returns a video with a transparent background (alpha channel); 'mp4' (default) returns a standard video. 'webm' requires an avatar that supports matting. When 'webm' is selected, any 'background' value is rejected and background removal is applied automatically — the caller does not need to set 'remove_background'.
mp4, webm Text script for the avatar to speak. Pair with voice_id, or omit voice_id when using avatar_id to use the avatar's default voice. Mutually exclusive with audio_url/audio_asset_id.
1Voice ID for text-to-speech. Required when script is provided, unless avatar_id is set (the avatar's default voice is used as fallback).
Public URL of an audio file to lip-sync. Mutually exclusive with script.
HeyGen asset ID of an uploaded audio file. Mutually exclusive with script.
Voice tuning parameters (speed, pitch, locale).
Natural-language prompt controlling avatar body motion and hand gestures. Supported for photo avatars on either engine, and for video avatars when engine.type is 'avatar_v'. Rejected for video avatars on the default Avatar IV engine.
Avatar expressiveness level. Photo avatars only. Defaults to 'low' when omitted. Avatar IV only; rejected when engine.type is 'avatar_v'.
high, medium, low Avatar V engine configuration with cross-reference-driven animation.
- AvatarVEngineConfig
- AvatarIVEngineConfig
- AvatarIIIEngineConfig
Response
Successful response

