Skip to main content
POST
Send Video Agent Message

Authorizations

x-api-key
string
header
required

HeyGen API key. Obtain from your HeyGen dashboard.

Headers

Idempotency-Key
string

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.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Path Parameters

session_id
string
required

Session ID

Body

application/json

One conversational or scene-edit turn in an existing Video Agent session.

message
string
default:""
required

Text message to the agent. Required when edit_plan is omitted; may be omitted or empty when edit_plan is provided.

Required string length: 1 - 10000
avatar_id
string | null

Override avatar for this message

voice_id
string | null

Override voice for this message

brand_kit_id
string | null

Brand kit ID to apply for this message. In enterprise workspaces with a locked brand policy, only the workspace default brand kit is accepted.

files
(AssetUrl · object | AssetId · object | AssetBase64 · object)[] | null

Optional file attachments (max 20 files)

Maximum array length: 20

Asset input via publicly accessible HTTPS URL.

edit_plan
VideoAgentSceneEdit · object[] | null

Scene-scoped natural-language edits to validate and submit atomically. Required when message is omitted or empty.

Required array length: 1 - 50 elements

Response

Successful response

data
SendMessageResponse · object

Response from submitting a turn to a session.