<img alt="" src="https://secure.heat6have.com/191694.png" style="display:none;">

HeyGen: Unleash the Power of AI Spokesperson Videos with Mendix Integration

6 steps to integrate HeyGene into your Mendix applications. Turn your text into a powerful video with HeyGene - an online tool with talking avatars that can help you create powerful video content without prior knowledge or skills!


 

Welcome to HeyGen, the ultimate online video tool with an AI talking avatar that can transform your text into an impressive AI spokesperson video within minutes. With a wide selection of AI avatars and the ability to synchronize lip movements with voices in various languages, HeyGen offers a seamless and efficient solution for creating captivating videos. Whether you're a content creator, marketer, or simply someone looking to add a unique touch to your videos, HeyGen is here to revolutionize your video creation process. Join us as we explore the exciting features and possibilities that HeyGen offers.

What is HeyGen?

HeyGen is an online video tool with AI talking avatar that can help you create an AI spokesperson video in minutes; you can turn text into a spokesperson video by typing and clicking. HeyGen has various AI avatars; you can lip-sync with voices in different languages. 

What can we Make? 

By following this document, we can generate – avatars and voices, create a video and retrieve a video. I am using a RESTful API.

Step-1: Go to  HeyGen - AI Spokesperson Video Generator and Signup for an account. After registering the HeyGen account, proceed to the account settings, scroll down to the API Keys section, and activate your API key. 

You can also test REST Endpoints in Postman before developing your app in Mendix.

Steps to integrate HeyGen with Mendix:

Step-1:

Create New App in the Mendix, Create an entity in Domain Model with the name Configuration and attribute as Token. Could you create a configuration page to save User Auth Token? 

Step-2:

Create a configuration microflow. 

Step-3:

Get a List of Avatars

You can use this endpoint to get a list of available avatars for generating videos. In this case, https://api.heygen.com/v1/avatar.list 

The type of HTTP Method is GET, Paste the URL in the location parameter and pass it as {1} in a template. 

You are also going to need some headers. We want to add a header for accept, which needs to be ‘application/json'. Next, we need another header called x-api-key. This is where you can use the user token you got. You need to add "$Configuration/Token" in the Value. 

As this method is GET, you don’t have a Request to pass. So, to get a Response you should add import mapping in Response handling. To know about the import mapping, please check-in
step-5.

You will get the Avatar information on your page when you trigger this microflow. 

Here is the full flow how the microflow looks like: 

 

Step-4:

Get a list of Voices

You can use this endpoint to get a list of available Voices for generating videos. In this case https://api.heygen.com/v1/voice.list  

The type of HTTP Method is GET, Paste the URL in the location parameter and pass it as {1} in a template. 

You are also going to need some headers. We want to add a header for Accept, which needs to be ‘application/json'. Next, we need another header called x-api-key; this is where you can use the user token you got. You need to add "$Configuration/Token" in the Value. 

 

As this method is GET, you don’t have a Request to pass. So, to get a Response you should add import mapping in Response handling. To know about the import mapping, please check
step-5.

You will get the Voices information on your page when you trigger this microflow. 

Here is the full flow how the microflow looks like: 

Step-5:

Create a video 

You can use this endpoint to create a video id. In this case https://api.heygen.com/v1/video.generate     

Could you create a JSON structure as below?

Import Mapping

Next, create an import mapping, and under schema source, select the JSON structure you created. Ensure the required fields are selected to get all the details you want.

Click ok to close the window, and then in the top left of the mapping editor, choose “map automatically.” and close. 

You should now see something like this: 

Finally, could you use this mapping to import the HTTP Request?   

As the endpoint describes the type of HTTP Method as POST. 

You are also going to need some headers. We want to add a header for Content-Type, which needs to be ‘application/json'. Next, we need another header called x-api-key; this is where you can use the user token you got. You need to add "$Configuration/Token" in the Value. 

To create a video, we have to provide a json body to this as this is an HTTP method. 

To get a Response you should add import mapping in Response handling. To know about the import mapping, please check step-5.

When you trigger this microflow, you will get the video id on your page 

Here is the full flow how the microflow looks like: 

Step-6:

Retrieve a video 

You can use this endpoint to generate the video URL. In this case, its https://api.heygen.com/v1/video_status.get   

As the endpoint describes the type of HTTP Method as GET, make sure to use GET 

Could you pass the video id from creating a video API?

You are also going to need some headers. We want to add a header for accept, which needs to be ‘application/json'. Next, we need another header called x-api-key; this is where you can use the user token you got. You need to add "$Configuration/Token" in the Value. 

As this method is GET, you don’t have a Request to pass. So, to get a response, you should add import mapping in Response handling. To know about the import mapping, please check
step-5.

When you trigger this microflow, you will generate the video URL on your page. 

Here is the complete flow how the microflow looks like: 

 

Whether you're a content creator, marketer, or someone looking to add that special touch to your videos, HeyGen has everything you need to make your content stand out. Join us as we explore the incredible features and endless possibilities of HeyGen.

Ready to unleash the power of HeyGen and take your videos to the next level?

Visit EvonSys' Mendix Marketplace Module for the HeyGen Connector at https://marketplace.mendix.com/link/component/209905. Discover a world of avatars, voices, video creation, and more.

 

Similar posts

Get notified on new marketing insights

Be the first to know about new B2B SaaS Marketing insights to build or refine your marketing function with the tools and knowledge of today’s industry.