Create a video from a HeyGen avatar or an arbitrary image. Set type to ‘avatar’ to use a previously created avatar, or ‘image’ to animate a custom image. Both modes support text-to-speech scripts or pre-recorded audio for lip-sync. The video is generated asynchronously — poll status via GET /v3/videos/.
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.
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. Requires voice_id. Mutually exclusive with audio_url/audio_asset_id.
1Voice ID for text-to-speech. Required when script is provided.
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