Creates a video from a HeyGen avatar or an arbitrary image. Supports scripts or pre-recorded audio for lip-sync. Supports the Avatar IV engine and the upcoming Avatar V, while Avatar III video generation requires the legacy API (v1 or v2) and will be deprecated by the end of July 2026.
HeyGen API key. Obtain from your HeyGen dashboard.
Create a video from a HeyGen avatar (video or photo avatar).
Provide an avatar_id to use a previously created avatar. The server automatically selects the appropriate engine based on the avatar type (video avatar or photo avatar).
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.
16:9, 9:16 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.
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. Photo avatars only.
Avatar expressiveness level. Photo avatars only. Defaults to 'low' when omitted.
high, medium, low Successful response