Discussions

Ask a Question
Back to All

Some More HeyGen API-related Questions

Hello again, HeyGen team!

I have a few more questions to clarify. I would appreciate your help on these!

  1. I encountered a problem related to data validation for a particular variable. Since most variables are responsible for some text on the background, it is very important that the entered text does not go beyond the container allocated to it. This is not a problem when the text is specified through your own editor, since I, as a user, immediately see the entered text and can adjust the text itself, block position, font size, boldness, etc., to avoid one text block overlapping another.

But if I I set the values of variables when creating a video through the API, this is not possible, since apart from the type of the variable I do not have any additional information about it.

"scene_1_sub_title": {
"name": "scene_1_sub_title",
"type": "text",
"properties": {
"content": ""
}
},

In this regard, the question is, is it possible to somehow set the default text for a variable (when adding a variable via the dashboard) so that it would be available in these variables in the response from “Get Template V2”? If not, is there anything like this planned in the future? Ideally, it would be great to be able to explicitly set the minimum and maximum text length for each variable, but if this is not possible, then the presence of default content would allow me to calculate at least the maximum text length.

  1. I also have a question regarding the avatars and voices used to create the template.

I noticed that for some public templates in the editing mode via the dashboard, the message “Previous voice option not available. Please select another one” is displayed in the voice selection section. As far as I understand, this can happen if a previously selected avatar or voice has been deleted and is no longer available for use. In this regard, there are a number of questions:

2.1 Could a similar situation happen with templates created by me and that are available through the public API endpoint "List Templates V2"?

2.2 Do I understand correctly that this problem can occur not only with avatar and voice, but also with other elements (fonts, icons, images, etc.)?

2.3 Is it possible to get information that the template is not valid (contains elements that are no longer available) through public API endpoints?

2.4 Will I get any error when getting a template by ID ("Get Template V2") if it contains elements that are no longer available?

2.5 What happens if I try to generate a video via "Generate from Template" or "Generate from Template V2" using a template that contains an element that is no longer available (for example, a voiceover)? Will the API throw some kind of error?

Thanks in advance for your help!

Regards,
Andrii