Discussions

Ask a Question
Back to All

Using Eleven Lab's voices when using templates

I have created a template with website editor and the video/template uses Eleven labs voice as default.

When I send this payload to the https://api.heygen.com/v1/template.generate -endpoint I get this error message:

"error":{"code":"400013","detail":"model_id is empty","message":"Text to speech failed"}

So IF I use eleven labs voices I should add some settings data to the payload, right? For example this model_id that the error message is refereeing to. BUT how? how do I edit the payload to add the missing data.

Here is the payload of the API call - SO how do I edit this to add the missing model_id info here? Thanks a mill if you can help!

{
"template_id": "23d6bd4c386f434f876fe65aece545c2",
"title": "Test generation",
"variables": [
{
"properties": {
"text": "Tadaa! Tadaa! Number 5! I'm test monster ponster!",
"voice_id": "d5342905d9ac43a382fefd51e89f35cd" //This is an eleven labs voice_id I got from the get voices end point. So HOW do I add the missing data to this to tell which model_id to use? Thanks.
},
"name": "avatar_0"
},
{
"properties": {
"text": "TEST TEST #5"
},
"name": "text_0"
}
],
"test": false,
"caption_open": true
}