Discussions

Ask a Question
Back to All

HeyGen API-related questions

Hello, HeyGen Team!

I've been working with your public API recently, studying the documentation and overall API capabilities and I have some questions to clarify that are related to working with templates via your public API.

  1. The first problem that I faced is that I get invalid templates in the "List Templates V2" templates list.

I'll explain.

After I create a template through the dashboard and save it, it appears in the list of templates that I receive through the public API (List Templates V2). Next, when I try to get information on this template by its ID (Get Template V2) I get this error:

"code": "invalid_parameter",
"message": "Template <template_id> has no variable set."

The error is due to the fact that required variables were not specified when creating the template.

By setting variables and updating the template, the problem is solved. But the question is whether when creating a template through the dashboard, it is possible to somehow mark templates as draft/published, in order to be able to exclude templates that are not yet fully ready (for example, all the necessary variables have not been set, or I want to continue editing later) from the list available in "List Templates V2"? If not, is there such a possibility planned in the future?

  1. I also encountered a number of problems related to templates that contain several scenes.

2.1 Currently, in your dashboard, when I click on a public template, a modal window opens with a preview of the template, as well as thumbnails of each scene. As far as I can see, the data for displaying this modal window is taken from the template object obtained from your internal API (api2.heygen.com/v1/pacific/template.list2).

Are there plans to add similar information for templates created by me and received through the public API, and if so, when? Because at the moment, in the templates that I receive from "List Templates V2", a link to the preview of only the first scene is available ("thumbnail_image_url"). This does not give a general idea of what will be contained in the future video and does not allow me to fully work with such templates.

2.2 The second problem partly follows from the first and is related to the list of variables that I get for a template by its ID (Get Template V2).

The point is that the list of variables is a single object that contains all the variables for the template without any connection to scenes. Considering that at the moment only the first page’s thumbnail is available through the public API, we have no way to understand what this or that variable from the list refers to. This problem is partly solved by naming variables with a semantic link to the scene (for example scene_1_title, scene_2_sub_title etc.).

But again, in the absence of a preview of each individual scene, it is not possible to understand what this or that variable refers to. What do you think about it? Are any works (changes/improvements) planned in this direction?

Thank you in advance and I'd really appreciate your help!

Best regards,
Andrii