Create HeyGen Video
Generates a scene with its sound from a prompt using HeyGen Video (heygen-video-1). Set mode to text_to_video, image_to_video or reference_to_video; reference-to-video takes up to twelve references in total, and reference videos must be between 1:4 and 4:1. Returns 202 with a video_id; poll GET /v3/models/videos/. Send an Idempotency-Key to retry safely; without one, each submission creates a new generation. To have an avatar speak a script, use POST /v3/videos.
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
- TextToVideoRequest
- ImageToVideoRequest
- ReferenceToVideoRequest
Body of POST /v3/models/videos: one schema per generation mode, selected by the required mode field.
Required video generation model. Only heygen-video-1 is supported.
"heygen-video-1"Instructions for the video to generate. At most 16,000 Unicode characters.
1 - 16000Generate from the prompt alone.
"text_to_video"Prompt enhancement mode: turbo, quality, ultraquality, or disabled. Defaults to quality; default is an alias for turbo.
turbo, quality, default, disabled, ultraquality Requested video duration: whole seconds from 5 through 15, or auto. Defaults to 5 when omitted. Auto selects a duration based on the prompt. Generation and billing use the resolved duration.
5 <= x <= 15Output resolution: 480p, 768p, 1080p, or 2k. Defaults to 768p. At 1080p and 2k, text-to-video and reference-to-video require aspect_ratio 16:9 or 9:16; image-to-video follows the image proportions.
480p, 768p, 1080p, 2k Output aspect ratio for text-to-video. Defaults to 16:9.
21:9, 16:9, 4:3, 1:1, 3:4, 9:16 Generation seed. A random seed is chosen when omitted.
0 <= x <= 4294967295HTTPS webhook URL for the terminal generation event.
Client tracking ID echoed in the terminal webhook event.
256Response
Accepted — submission acknowledged; poll for completion.

