Skip to main content
POST
Create HeyGen Video

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}$

Body

application/json

Body of POST /v3/models/videos: one schema per generation mode, selected by the required mode field.

model
string
required

Required video generation model. Only heygen-video-1 is supported.

Allowed value: "heygen-video-1"
prompt
string
required

Instructions for the video to generate. At most 5,000 Unicode characters.

Required string length: 1 - 5000
mode
string
required

Generate from the prompt alone.

Allowed value: "text_to_video"
prompt_enhancement
enum<string>
default:turbo

Prompt enhancement mode: turbo, quality, or disabled. Defaults to turbo; default is an alias for turbo.

Available options:
turbo,
quality,
default,
disabled
duration
integer
default:5

Requested video duration in whole seconds, from 5 through 15 inclusive.

Required range: 5 <= x <= 15
resolution
enum<string>
default:768p

Output resolution: 480p or 768p. Defaults to 768p.

Available options:
480p,
768p
aspect_ratio
enum<string>
default:16:9

Output aspect ratio for text-to-video. Defaults to 16:9.

Available options:
21:9,
16:9,
4:3,
1:1,
3:4,
9:16
seed
integer | null

Generation seed. A random seed is chosen when omitted.

Required range: 0 <= x <= 4294967295
callback_url
string | null

HTTPS webhook URL for the terminal generation event.

callback_id
string | null

Client tracking ID echoed in the terminal webhook event.

Maximum string length: 256

Response

Accepted — submission acknowledged; poll for completion.

data
CreateModelVideoResponse · object