Templates

Create Template from Video

Changed on

Creates a private template from one of your videos, copying its scenes, avatars, script and media. URL-to-Video and older editor videos return template_source_unsupported. The template starts with no variables; declare them with PUT /v3/templates/{template_id}/variables.

post/v3/templates

Request

  • Base URL
    https://api.heygen.com
  • URL
    https://api.heygen.com/v3/templates
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Headers

Idempotency-Keystring

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.

Request body

video_idstring required

ID of a video in your workspace to turn into a template. The video must have been generated with POST /v3/videos or saved in the HeyGen editor; its draft becomes the template's starting point.

namestring nullable

Template name. Defaults to the source video's title.

Example request

{
  "video_id": "7c1f0b2e3d4a4f5e8a9b0c1d2e3f4a5b",
  "name": "Q4 outreach"
}

Response

Created.

Changes