Create Video Agent Session

cURL

curl --request POST \
  --url https://api.heygen.com/v3/video-agents \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "mode": "generate",
  "avatar_id": "<string>",
  "voice_id": "<string>",
  "style_id": "<string>",
  "orientation": "landscape",
  "files": [\
    {\
      "type": "<string>",\
      "url": "<string>"\
    }\
  ],
  "callback_url": "<string>",
  "callback_id": "<string>",
  "incognito_mode": false
}
'

Response Codes

  • 200
  • 400
  • 401
  • 429
{
  "data": {
    "session_id": "<string>",
    "status": "generating",
    "created_at": 123,
    "video_id": "v_abc123def456"
  }
}

Authorizations

ApiKeyAuth

  • Header: x-api-key
  • Type: string
  • Required: Yes
    HeyGen API key. Obtain from your HeyGen dashboard.

Body

application/json

Request body for creating a video from a prompt using Video Agent v3.

Supports two modes:

  • generate (default): one-shot — auto-proceeds through storyboard, produces one video.
  • chat: multi-turn — may pause for user input on real decisions (e.g. pick a voice), auto-proceeds on confirmations. Allows revisions and follow-up videos.

Fields

  • prompt
    Type: string
    Required: Yes
    The message/prompt for video generation (1-10000 characters).

  • mode
    Type: enum
    Default: generate Session mode. Options: generate, chat.

  • avatar_id
    Type: string | null
    Specific avatar ID to use.

  • voice_id
    Type: string | null
    Specific voice ID to use for narration.

  • style_id
    Type: string | null
    Style ID from GET /v3/video-agents/styles.

  • orientation
    Type: enum | null
    Available options: landscape, portrait.

  • files
    Type: (AssetUrl · object | AssetId · object | AssetBase64 · object)[] | null
    Optional file attachments (max 20 files).

  • callback_url
    Type: string | null
    Webhook URL for completion/failure notifications.

  • callback_id
    Type: string | null
    Optional callback ID included in webhook payload.

  • incognito_mode
    Type: boolean
    Default: false
    When enabled, disables memory injection and extraction for this session.

Response

200

application/json
Successful response structure that includes creation details for future extensibility.