Video Agent

Create a video from a prompt

Changed on

Creates a video from a text prompt with Video Agent, which picks the avatar, writes the script and produces the video. Runs asynchronously: poll GET /v2/videos/{video_id} with the returned video_id.

post/v1/video_agent/generate

Request

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

Request body

promptstring required

The message/prompt for video generation (1-10000 characters)

avatar_idstring nullable

Specific avatar ID to use

voice_idstring nullable

Specific voice ID to use for narration

orientation'landscape' | 'portrait' nullable

Video orientation. If not provided, auto-detected from content.

duration_secinteger nullable

Approximate video duration in seconds (minimum 5)

callback_urlstring nullable

Webhook URL for completion/failure notifications

callback_idstring nullable

Optional callback ID included in webhook payload

incognito_modeboolean

When enabled, disables memory injection and extraction for this session

Response

Successful response

errorobject nullable

Changes