post https://apis.elai.io/api/v1/avatars
Use this endpoint to create photo avatars
Note: image should be one of the following formats: png, jpg, jfif, pjpeg.
Request example
{
"gender": "female",
"image": {
"name": "my_photo.png",
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAABsCAYAAABtuky0AAAA4WlD..."
}
}
Response example
{
"id": "64d08e8ccebd0817a3f6285e",
"code": "866239846101",
"status": 2,
"type": "photo",
"order": 1,
"accountId": "648822174e61217808f01fdd",
"frontendConfig": {
"gender": "male",
"thumbnail": "https://elai-us-prod.s3.us-east-2.amazonaws.com/production/avatar_uploads/648822174e61217808f01fdc/photo_2023-08-04_16-19-14_thumbnail.jpg",
"canvas": "https://elai-us-prod.s3.us-east-2.amazonaws.com/production/avatar_uploads/648822174e61217808f01fdc/photo_2023-08-04_16-19-14.jpg",
"tilt": {
"top": 0,
"left": 0,
"zoom": 1
},
"faceBbox": {
"x": 0,
"y": 163,
"faceWidth": 720,
"faceHeight": 896
}
},
"avatarConfig": {
"user_alpha_channel_img_s3": "s3://elai-us-prod/production/avatar_uploads/648822174e61217808f01fdc/photo_2023-08-04_16-19-14_alpha.png",
"user_photo_s3": "s3://elai-us-prod/production/avatar_uploads/648822174e61217808f01fdc/photo_2023-08-04_16-19-14.jpg"
},
"variants": [],
"createdAt": "2023-08-07T06:26:20.967Z",
"updatedAt": "2023-08-07T06:26:20.967Z"
}