Discussions

Ask a Question
Back to all

Background image cropped & wrongly positioned when using Generate API from Template

Hi team ....

I'm a paying customer and I'm having trouble generating videos via API based on a basic pre-generated custom template that I have created, which includes an image variable.


I succesfully call the following endpoint, which includes the correct template ID and a correct json payload
https://api.heygen.com/v2/template/3a5ccd2a318e4005977ae81631b49ebb/generate

The problem that I see is that I should see a background image changing, turning into the one I'm indicating in the payload. And it does replace it, but the image remains sitting at the top, and it's chopped, only showing the bottom part. I have tried multiple values for the "fit" property and several publicly available images, to no avail.

This is one of the json used when calling the API

{
"caption": true,
"title": "New Video",
"dimension": {
"width": 1280,
"height": 720
},
"variables": {
"Segment2_BckgrndImgUrl": {
"name": "Segment2_BckgrndImgUrl",
"type": "image",
"properties": {
"url": "https://macma.org/storage/06TPFDn6xt9nMdChKkB0YGxGpHXh7g0Q9XX3Gagt.jpg",
"fit": "none"
}
}
}
}