Discussions

Ask a Question
Back to All

the video generated have a black background towards the end

Why, when using the template.generate interface, does the video generated have a black background towards the end, and the original template image is gone? Here is the code:

import requests

url = "https://api.heygen.com/v1/template.generate"

import requests

url = "https://api.heygen.com/v1/template.generate"

payload = {
"template_id": "df40ac22cfe9421aa9c3578de7ae5af3",

"title": "replace avatar",
"test": True,


"variables": [
      {
           "properties": {
                "id": "00f94d73ac0c4c70bed22ba08787e0d9",
                "text": "Hello, I am Zhang Xiaole, an employee at Yuan Digital.",
                "voice_id": "3b1633a466c44379bf8b5a2884727588"
           },
           "name": "photar_0"
      }
 ],

}
headers = {
"accept": "application/json",
"content-type": "application/json",
"x-api-key": 'xxxx'
}

response = requests.post(url, json=payload, headers=headers)