Discussions
API Video Variable Not Binding to Avatar-less Scene in New AI Studio Template
Hi HeyGen Support,
I'm experiencing an issue where a video variable assigned to an avatar-less scene in New AI Studio is not being recognized by the V3 Template API, causing video override via the Generate Video API to fail silently.
TEMPLATE DETAILS
- Template ID: ce0c0bc4c56c4bbf989c5b37f0564df3
- Created in: New AI Studio (not Legacy Editor)
- Total scenes: 11
- Problem scene: Scene 9 (ID: oo0e7ocF) — an avatar-less B-roll scene
WHAT I'M TRYING TO DO
I have a training video template where Scene 9 is a B-roll scene with no avatar. It contains a video element with an API variable named "broll_video" so I can dynamically replace the B-roll clip via the Generate Video from Template API (V2/V3).
THE PROBLEM
When I retrieve the template via the V3 API (GET /v3/template/{template_id}), the response shows:
-
Template-level variables correctly include "broll_video" as type "video":
{
"broll_video": {
"name": "broll_video",
"type": "video",
"properties": {
"url": "https://static.heygen.ai/tmp_resource/872e7a4e-7a06-4540-a372-b71a718e8d21",
"play_style": "loop",
"fit": "none",
"volume": 1.0
}
}
} -
However, Scene 9's variables array is completely empty:
{
"id": "oo0e7ocF",
"script": " ",
"variables": []
}
All other scenes (which have avatars) correctly list their variables. For example, Scene 8 (ID: GaiOBC8h) properly shows:
{
"id": "GaiOBC8h",
"script": "{{scene_8a_script}}",
"variables": [
{"name": "badge_text", "type": "text"},
{"name": "caption", "type": "text"},
{"name": "scene_8a_script", "type": "text"}
]
}
RESULT
When I send a Generate Video request with a replacement video URL or asset_id for "broll_video", the API accepts the request without error, but the rendered video uses the original template video instead of my override. The B-roll scene is completely silent (the original video has no audio), confirming the replacement video was ignored.
WHAT I'VE TRIED
- Overriding via URL (V2 Generate API) — video not replaced
- Overriding via asset_id (uploaded via Upload Asset API, asset ID: f343325b5982495890afedc597e4a768) — video not replaced
- Reassigning the variable in the editor — saved, but V3 API still returns empty variables for Scene 9
- Deleting the scene and recreating it using Media Scene Layout — same result, variables still empty
- Setting the video as scene background instead of canvas element — same result
- Renaming the variable to "broll_video1" — the new name does not appear in the API response at all
In all cases, the V3 API consistently returns "variables": [] for Scene 9.
SUSPECTED ROOT CAUSE
It appears that HeyGen's New AI Studio backend does not serialize/persist video variable bindings for scenes that have no avatar. All scenes with avatars correctly expose their variables through the API. Only the avatar-less scene fails to register its variables, even though the editor UI shows the variable assignment.
QUESTIONS
- Is there a specific procedure to correctly bind a video variable to an avatar-less scene so it appears in the V3 API response?
- Is this a known limitation of New AI Studio for scenes without avatars?
- Is there an alternative API approach to override a video element in an avatar-less scene?
This is blocking our production workflow for automated training video generation. Any guidance would be greatly appreciated.
Thank you.