Best for · AI tools
HeyGen API video_inputs: the structure, a working example, and the v3 move
- Last checked
- 4 sources, linked below
- By the vectaai team
We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.
Verdict Our pick
The bar guide has a call.

- In HeyGen's v2 API, POST https://api.heygen.com/v2/video/generate takes a required videoinputs array of 1 to 50 scenes.
Compared here
- 01HeyGen API v2 /v2/video/generate
- 02video_inputs
- 03HeyGen API v3 /v3/videos
- 04Studio scenes
Short answer
In HeyGen's v2 API, POST https://api.heygen.com/v2/video/generate takes a required video_inputs array of 1 to 50 scenes. Each scene is an object with a character (an avatar or a talking_photo), a voice (text, audio or silence) and an optional background (color, image or video), plus optional on-screen text. Top level you can add dimension (default 1920 x 1080), caption, title and callback_id. The response returns data.video_id.
Important: HeyGen's own docs now say v1 and v2 passed their 31 October 2026 sunset and are being removed, so calls "may fail intermittently". The replacement for multi-scene video_inputs is POST /v3/videos with type: "studio" and a scenes array (also 1 to 50 scenes). Below: the v2 structure field by field, a full example, then the same video in v3.
Sponsored links. We may earn a commission; it never changes the pick.
At a glance
| Object | Field | Allowed values (quoted) | v3 studio equivalent |
|---|---|---|---|
| character | type | avatar, talking_photo | scene type avatar_video, input type avatar |
| character | avatar_id / talking_photo_id | From List All Avatars (V2) | input.avatar_id (from GET /v3/avatars) |
| character | scale, offset, avatar_style | scale 0.0 to 5.0; style circle, closeUp, normal | Not in the studio summary we read |
| voice | type | text, audio, silence | script, audio_url or audio_asset_id (exactly one) |
| voice | speed, pitch, emotion | speed 0.5 to 1.5; pitch -50 to 50; Excited, Friendly, Serious, Soothing, Broadcaster | voice_settings |
| voice | duration (silence) | 1.0 to 100.0 seconds | image scene with duration up to 300 s |
| background | type | color, image, video | color, image, video |
| background | play_style, fit | freeze, loop, fit_to_scene; crop, cover, contain, none | video scene playback.mode: freeze, loop, fit_to_scene |
Money first. HeyGen pays affiliates 20% to 30% for 6 months, so the HeyGen link here may earn us money if you sign up. The API structure is the same whether you click it or not. We did not call the API for this page. The v2 field list comes from HeyGen's own v2 reference page, which now returns 404 on HeyGen's site, so we read an archived copy of that official page (snapshot 10 March 2026). The sunset status and v3 structure come from HeyGen's live docs, read on 4 December 2026.
Here is the plain version. If you landed here with an old script that builds a video_inputs array, two things are true. One: the structure below will help you read and debug it. Two: that endpoint is on its way out. HeyGen says v1 and v2 passed their sunset on 31 October 2026 and "calls may fail intermittently until removal is complete". So read the v2 part to understand your code, then use the v3 part to move it.
The v2 request at a glance
POST https://api.heygen.com/v2/video/generate
Top-level body fields from HeyGen's v2 reference:
| Field | Type | What it does |
|---|---|---|
video_inputs | array, required | 1 to 50 scenes, rendered in order |
dimension | object | width default 1920, height default 1080 |
caption | boolean | Captions; "Only supported for text-based input", default false |
title | string | Video title |
callback_id | string | Your own ID, returned in the status or webhook payload |
folder_id | string | Folder to store the video |
The reference also said the endpoint "supports Avatar III and Avatar IV".
Inside one video_inputs item
Each item is a scene with up to four parts.
character
| Field | Applies to | Values from the reference |
|---|---|---|
type | both | avatar (default) or talking_photo |
avatar_id | avatar | From List All Avatars (V2) |
talking_photo_id | talking photo | From List All Avatars (V2) |
scale | both | 0.0 to 5.0, default 1 |
offset | both | { "x": 0.0, "y": 0.0 } centers the character |
avatar_style | avatar | circle, closeUp, normal (default) |
talking_photo_style | talking photo | circle |
circle_background_color | both | Hex, for the circle style |
matting | both | Remove the photo background |
talking_style | talking photo | stable (default) or expressive |
expression | talking photo | default or happy |
super_resolution | talking photo | Enhance image quality |
use_avatar_iv_model | talking photo | Use Avatar IV; then prompt sets an Avatar IV motion prompt |
voice
| Field | Applies to | Values from the reference |
|---|---|---|
type | all | text, audio or silence |
voice_id | text | From List All Voices (V2) |
input_text | text | What the avatar says |
speed | text | 0.5 to 1.5, default 1 |
pitch | text | -50 to 50, default 0 |
emotion | text | Excited, Friendly, Serious, Soothing, Broadcaster |
locale | text | For multilingual voices, e.g. en-US, pt-BR |
elevenlabs_settings | text | Advanced settings with an ElevenLabs model choice |
audio_url / audio_asset_id | audio | Exactly one of the two; both or neither is an error |
duration | silence | 1.0 to 100.0 seconds |
background (optional)
| Field | Values from the reference |
|---|---|
type | color, image, video |
value | Hex color for color, default #FFFFFF |
url / image_asset_id / video_asset_id | The uploaded image or video |
play_style | freeze, loop, fit_to_scene |
fit | crop, cover (default), contain, none |
text (optional)
On-screen text with type: "text", the text itself, font_family, font_size, font_weight, alignment and a required line_height.
A full v2 example
Two scenes: an avatar intro on a blue background, then a talking photo over an image.
{
"title": "Welcome video",
"dimension": { "width": 1920, "height": 1080 },
"caption": false,
"callback_id": "welcome-001",
"video_inputs": [
{
"character": {
"type": "avatar",
"avatar_id": "YOUR_AVATAR_ID",
"avatar_style": "normal",
"scale": 1
},
"voice": {
"type": "text",
"voice_id": "YOUR_VOICE_ID",
"input_text": "Hi, welcome aboard. Here is what happens next.",
"speed": 1,
"emotion": "Friendly"
},
"background": { "type": "color", "value": "#87CEEB" }
},
{
"character": {
"type": "talking_photo",
"talking_photo_id": "YOUR_TALKING_PHOTO_ID",
"talking_style": "expressive"
},
"voice": {
"type": "audio",
"audio_url": "https://example.com/step-two.mp3"
},
"background": {
"type": "image",
"url": "https://example.com/office.jpg",
"fit": "cover"
}
}
]
}
Send it with your API key in the same auth header your old code already uses. A success looks like {"error": null, "data": {"video_id": "..."}}. Then poll the status endpoint with that ID.
The 400 errors the reference warned about
circle_background_colornot in hex format.- An image background with neither
urlnorimage_asset_id. - An audio voice with neither, or both, of
audio_urlandaudio_asset_id.
Add the obvious ones: speed outside 0.5 to 1.5, pitch outside -50 to 50, or an avatar_id from a different account.
The same video in v3
HeyGen's mapping table: POST /v2/video/generate becomes POST /v3/videos, and multi-scene calls become type: "studio". Status moves to GET /v3/videos/{video_id}, avatars to GET /v3/avatars, voices to GET /v3/models/audio/voices.
The v3 studio structure, from HeyGen's "Build a video from scenes" doc:
scenes: 1 to 50 items, each rendered up to 30 minutes; longer audio must be split across scenes.- Scene types:
avatar_video,imageandvideo. - An
avatar_videoscene has aninputwithtype: "avatar", anavatar_idand exactly one audio source:script(with optionalvoice_id),audio_urloraudio_asset_id. Optional:voice_settings,engine,motion_prompt,expressiveness,background,remove_background. - Backgrounds:
{ "type": "color", "color": "#RRGGBB" }, orimageorvideowith asource. - Sources are
{ "type": "url", "url": "..." }or{ "type": "asset_id", "asset_id": "..." }. No inline base64. - Global:
aspect_ratio(default 16:9),resolution(720por1080p),caption,title,callback_url,callback_id.
Our sketch of the first scene above in v3, built from those field names:
{
"type": "studio",
"aspect_ratio": "16:9",
"resolution": "1080p",
"title": "Welcome video",
"callback_id": "welcome-001",
"scenes": [
{
"type": "avatar_video",
"input": {
"type": "avatar",
"avatar_id": "YOUR_V3_AVATAR_ID",
"script": "Hi, welcome aboard. Here is what happens next.",
"voice_id": "YOUR_VOICE_ID",
"background": { "type": "color", "color": "#87CEEB" }
}
}
]
}
Check the exact nesting against HeyGen's quick example before you ship; the doc we read summarises fields but HeyGen is the final word.
Migration checklist
- Re-fetch IDs from
GET /v3/avatarsandGET /v3/models/audio/voices. Do not assume v2 IDs carry over. - Map each
video_inputsitem to a scene. Avatar plus text becomesavatar_videowithscript. Silence becomes animagescene with aduration(up to 300 seconds) or is dropped. - Move
valuetocolorfor color backgrounds, and wrap image or video URLs in asource. - Replace
dimensionwithaspect_ratioandresolution. - Voice is now optional: v3 "falls back to the avatar's default voice when omitted", where v2 always required
voice_id. - One studio video per request. The batch endpoint rejects
type: "studio". - Poll
GET /v3/videos/{video_id}untilstatusiscompleted, or pass acallback_url.
If your old code used use_avatar_iv_model, note that Avatar IV is now the default engine in v3; our HeyGen Avatar IV guide covers its credit costs and motion prompts.
Bottom line
video_inputs is a simple idea: an array of scenes, each with a character, a voice and a background. That structure lives on in v3 as scenes, with cleaner sources and fewer fiddly knobs. Since v2 is past its sunset, treat this page as a decoder for old code and a map for moving it. For plan costs, see our HeyGen Creator plan review, and for other tools, HeyGen alternatives. More in the AI tools hub.
What we could not verify
The live v2 reference page returns 404, so v2 fields come from the archived official copy dated 10 March 2026. The v3 studio doc summary we read did not show scale, offset or avatar style equivalents. The API key header for v3 was not on the pages we read; check HeyGen's API key doc.
Questions people ask
What is video_inputs in the HeyGen API?
It is the required array in the v2 Create Avatar Video request. HeyGen's reference describes each item as a scene: the avatar, background, voice and script together. The array must hold between 1 and 50 items, and the scenes render in order into one video. Each item needs a character and a voice; background and text are optional.
Does the HeyGen v2 API still work?
Not reliably. HeyGen's endpoint version comparison page says v1 and v2 reached end of support at the 31 October 2026 sunset, v3 is the supported API, and v1 and v2 endpoints are being removed, so calls may fail intermittently until removal is complete. Move any production code to POST /v3/videos.
What replaces video_inputs in HeyGen API v3?
A scenes array on POST /v3/videos with type set to studio. HeyGen's docs list three scene types: avatar_video, image and video, with 1 to 50 scenes per request and up to 30 minutes per scene. Status moves from GET /v2/videos/{id} to GET /v3/videos/{video_id}, polled until status is completed.
How do I use a talking photo instead of an avatar in video_inputs?
Set character.type to talking_photo and pass talking_photo_id instead of avatar_id. The v2 reference adds talking photo only options: talking_style stable or expressive, expression default or happy, super_resolution, and use_avatar_iv_model with an optional Avatar IV motion prompt. Avatar style options apply only to the avatar type.
Why does my HeyGen video_inputs request return 400?
Common causes in the v2 reference's error notes: circle_background_color not in hex, an image background with neither url nor image_asset_id, or an audio voice with neither or both of audio_url and audio_asset_id. Also check speed stays between 0.5 and 1.5 and pitch between -50 and 50.
Sources
Every fact above comes from these pages. Prices change, so each one carries the date we read it.
- HeyGen docs: Endpoint version comparison (v1/v2 sunset), checked 4 Dec 2026
- HeyGen docs: Build a video from scenes (v3 studio), checked 4 Dec 2026
- HeyGen v2 reference: Create Avatar Video (archived copy of the official page, 10 March 2026), checked 4 Dec 2026
- HeyGen docs index (llms.txt), checked 4 Dec 2026