Discussions
Create an Avatar Video V2
Running the following code always reports an error.
import requests
url = "https://api.heygen.com/v2/video/generate"
payload = {
"caption": True,
"aspect_ratio": "16:9",
"caption": False,
"dimension": {
"width": 1920,
"height": 1080
},
"title": "机器学习",
"video_inputs": [
{
"character": {
"type": "avatar",
"avatar_id": "Jocelyn_sitting_sofa_front",
"scale": 1,
"avatar_style": "normal",
"offset": {
"x": 0,
"y": 0
}
},
"voice":{
"type": "text",
"voice_id": "00c8fd447ad7480ab1785825978a2215",
"input_text": "这是一个关于机器学习的视频。"
}
}
]
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"x-api-key": "XXXXXXXX=="
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
The platform always displays: Video render failed, we are looking into this issue. Video credits refunded.