get https://apis.elai.io/api/v1/avatars
Get all available avatars
How to add specific avatar to your video
The best way to do it is to create a video with this avatar in the builder, retrieve it using GET /videos, and use the structure from that video.
There are 2 places where you need to set up proper data for each avatar on the slide to be valid:
- slide.avatar should have at least 2 properties:
- id - avatar id and variant id separated by dot: {avatarId}.{variantId}
- version - either 1 or 2 versions of the avatar
- canvas.objects[].type: avatar - object with type avatar, which contains all visual settings of a particular avatar on the slide. Please refer to the actual structure in the builder for reference.
{
"avatar": {
"id": "gia.casual",
"version": 2,
"name": "Gia Casual",
"gender": "female",
"canvas": "https://elai-avatars.s3.us-east-2.amazonaws.com/common/gia/casual/gia_casual.png"
},
"canvas": {
"objects": [
{
"type": "avatar",
"version": 2,
"left": 151.5,
"top": 36,
"fill": "#4868FF",
"scaleX": 0.3,
"scaleY": 0.3,
"src": "https://elai-avatars.s3.us-east-2.amazonaws.com/common/gia/casual/gia_casual.png",
"avatarType": "transparent",
"animation": {
"type": null,
"exitType": null
}
}
]
}
}