Generate Video from Template
Generates a video from the template by replacing its variables (text, image, video, audio, character, voice). Use scene_ids to select, reorder, or repeat scenes — scenes must already exist in the template; the API cannot create new ones. Returns the created video object; poll GET /v3/videos/ or use webhooks for completion. Idempotent replays return the original creation-time snapshot (status and URLs as of the first request), not the video’s current state.
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}$Path Parameters
Unique template identifier
Body
Request body for POST /v3/templates/{template_id}.
Template variable replacements, keyed by the variable name defined in the template
Title for the generated video
Whether to burn captions into the video
Subtitle style settings. Implies captions when provided.
Opaque ID echoed back in webhook events for this video
URL called with the video result in addition to registered webhook endpoints
Folder to place the generated video in
Brand voice ID controlling pronunciation
Output resolution override. Must match the template's aspect ratio.
Output frame rate. One of 25, 30, or 60.
Scene IDs to render, in order (repeats allowed). Scenes must already exist in the template; the API can select, reorder, and repeat scenes but cannot create new ones. Omit to render all scenes in template order.
When true (default), background audio tracks move with their scenes. When false, tracks stay pinned to layout positions.
When true, replaced text elements are vertically re-centered based on their rendered height
Whether to include a GIF preview in the webhook payload
Whether the generated video's share page is publicly accessible
Response
Successful response
Video resource returned by list and detail endpoints.
If output_language is present the video is a translated video;
otherwise it is a generated video.

