Discussions
Background image not appearing in video when using API (but works in UI)
Hello,
I’m currently integrating HeyGen via API to generate testimonial-style videos with avatars.
The video is generated successfully, the avatar and voice work correctly, but the background image does not appear in the final video — even though I am sending it in the request body.
Important context:
• When creating the video manually in the HeyGen interface, adding a background image works correctly.
• The issue only happens when generating the video via API.
• There are no errors returned by the API.
• The video renders, but the background defaults to a plain background instead of the provided image.
I am currently sending the following payload:
{
"video_inputs": [
{
"character": {
"type": "avatar",
"avatar_id": "f5d499bb3d224ba4b157bf7a8e8e53a6",
"scale": 1.2 },
"voice": {
"type": "text",
"input_text": "I’ve tried so many sneakers before, but nothing felt quite right for everyday use. Since I started wearing FitRun, I can walk all day without feeling discomfort. They’re lightweight, breathable, and genuinely comfortable. It’s one of those products you don’t realize you needed until you try it.",
"voice_id": "{$('Set Variables').item.json.voice_id",
"speed": 1.2
},
"background": {
"type": "image",
"image_asset_id": "0ab3a1512dcf47eba7b7deca2bd22b78"
}
}
]
}