Create Videos with Your Personal Avatar and Voice
With HeyGen v2 API, you can create videos using ready-made Avatars as well as Instant Avatars that you create yourself. In this tutorial, we will create videos with using your own Instant Avatar and your own voice.
Generate An Instant Avatar on Web Interface
Begin by creating your unique Instant Avatar on the Create Instant Avatar page. During the final stage of creation, you'll assign a name to your avatar, with this name we will choose our avatar and voice. Wait to finish processing operation of your Instant Avatar.
If you already have an Instant Avatar, you can find its name on the Avatar page.
List Avatars
See detailed API reference
This API call will provide you with a list of avatars. Find the name you gave your Instant Avatar here and get its avatar_id
.
curl --request GET \
--url https://api.heygen.com/v2/avatars \
--header 'Accept: application/json' \
--header 'X-Api-Key: <your-api-key>'
{
"error": null,
"data": {
"avatars": [
{
"avatar_id": "<avatar_id>",
"avatar_name": "My Instant Avatar",
"gender": "male",
"preview_image_url": "<preview_image_url>",
"preview_video_url": "<preview_video_url>"
},
{
"avatar_id": "Angela-inblackskirt-20220820",
"avatar_name": "Angela in Black Dress",
"gender": "female",
"preview_image_url": "<preview_image_url>",
"preview_video_url": "<preview_video_url>"
},
]
}
}
List Voices
See detailed API reference
This API call will provide you with a list of voices. The display_name
field will contain the name of your voice. You can find your voice name on the Voice page.
curl --request GET \
--url https://api.heygen.com/v1/voice.list \
--header 'Accept: application/json' \
--header 'X-Api-Key: <your-api-key>'
{
"code": 100,
"data": {
"list": [
{
"voice_id": "<voice_id>",
"labels": [],
"language": "English",
"flag": "https://static.movio.la/region_flags/us.png",
"locale": "unknown",
"sort": 0,
"gender": "<gender>",
"tags": "",
"display_name": "<display_name>",
"preview": {
"movio": "<preview-url>"
},
"settings": {
"style": "",
"elevenlabs_settings": {
"model_id": "eleven_multilingual_v2",
"similarity_boost": 0.75,
"stability": 0.75,
"style": 0,
"use_speaker_boost": true
}
},
"ssml": {
"style": [],
"lang": [],
"break": true,
"prosody": ["rate"],
"emphasis": "none",
"say_as": []
},
"is_customer": true,
"is_favorite": false,
"is_paid": false,
"support_realtime": false
}
]
},
"msg": null,
"message": null
}
Assuming you've get your avatar_id
and a voice_id
, you're all set to move on to the next steps.
Next Steps...
You can proceed from this point by following the instructions on the "Create Avatar Video with v2 APIs" page. The steps remain identical, just remember to update the avatar_id
and voice_id
fields with the values you've obtained.
Get ready to create videos with your personal avatar and voice using HeyGen's innovative platform!
Updated 11 months ago