Skip to main content
This is the one-shot workflow — send a prompt, get a video. For multi-turn collaboration with the agent, see Interactive Sessions.

Video Agent in 30 seconds.

POST /v3/video-agents Send a text prompt describing the video you want. The agent handles scripting, avatar selection, scene composition, and rendering. The video is generated asynchronously — use the returned session_id to track progress and retrieve the video_id once rendering begins.

Powered by Hyperframes

Video Agent composes and renders its graphics with Hyperframes, HeyGen’s open-source HTML-to-video framework (GitHub). Every animated stat, chart, caption treatment, and scene transition in a generated video is a Hyperframes composition the agent authors to your direction. Because scenes are built in code rather than assembled from a fixed template set, the agent can produce any look you can describe — which is what makes the style paragraph in your prompt so effective. To render your own compositions through the same engine, see Hyperframes Cloud Rendering.

Request body

Only prompt (1–10,000 characters) is required; see the Prompting Guide. The Create Session reference lists every field. The ones that shape the result:
  • mode: "generate" (default) runs one-shot; "chat" pauses for review and revisions, see Interactive Sessions.
  • avatar_id, voice_id: pin a look or voice, or omit them to let the agent choose.
  • style_id: a curated visual template from GET /v3/video-agents/styles, see Styles & References.
  • brand_kit_id: a brand kit from GET /v3/brand-kits applies your colors, fonts, and logo to everything the agent builds.
  • brand_glossary_id: a brand glossary from GET /v3/brand-glossaries sets how custom terms are pronounced; captions and subtitles keep the original spelling.
  • orientation: "landscape" or "portrait", auto-detected when omitted.
  • files: up to 20 attachments, see below.
  • callback_url, callback_id: a webhook on completion or failure.
  • incognito_mode: true disables memory injection and extraction for the session.

File input formats

Each item in the files array uses a type discriminator to specify how the file is provided:
Supported file types: image (png, jpeg), video (mp4, webm), audio (mp3, wav), and pdf. Upload files in advance via POST /v3/assets to get an asset_id — see Upload Assets.

Example request

The response carries a session_id and a session status (thinking, generating, completed, or failed). Its video_id is null until rendering begins.

Poll for completion

Video generation is asynchronous — processing typically takes 5x–10x the final video length (a 1-minute video takes ~5–10 minutes; enterprise plans get priority queue access). Set poll intervals of 10–30 seconds, or skip polling entirely with a webhook. If a video has been processing for more than 24 hours, contact HeyGen Support with your video_id. First, poll the session until it has a video_id, then poll the video for its final status. Stop polling the session if its status is failed, or waiting_for_input (the agent needs a reply; answer with POST /v3/video-agents/{session_id}).
A completed video carries video_url, thumbnail_url, duration, and video_page_url; a failed one carries failure_code and failure_message. See Get Video for every field.

Use webhooks instead of polling

Pass a callback_url in the creation request to receive a POST when the video completes or fails. The optional callback_id is echoed back in the webhook payload so you can correlate notifications with requests. To list or permanently remove videos, use GET /v3/videos and DELETE /v3/videos/{video_id}.

Write a better prompt

The prompt is the whole interface: the agent makes every decision you leave open. The Prompting Guide builds one real prompt step by step and shows the video it produced.