Skip to content

Avatar Creation

This API guide provides an overview of creating avatars on our platform.


You can view a list of all default avatars and personalized avatars and check their status. Use the avatar 'id' to monitor progress, as the generation process may take some time. Once ready, you can use these avatars to generate videos, enhancing your content with personalized avatar features. 🦊

Quick Start

Let’s dive in and explore how to create instant and premium avatars on our platform.

Create Instant Avatar

An instant avatar is generated quickly from a photo you provide, offering a fast way to create an avatar. To create an instant avatar, you must provide a photo that adheres to these guidelines, as the quality of the avatar is entirely dependent on the provided photo. Make a request to the API for instant avatar creation. Accepted image formats include 'png' and 'jpeg'.

Send file and other data as multipart/form-data with keys given in the sample request.

In the response, the 'id' is the key element you will use for bulk video request. The 'thumbnail' provides a preview of the newly created avatar, allowing you to review it before use. Additional details such as 'name', 'gender', and 'user' will also be included in the response.

Use avatar status api to check the avatar status.

curl --request POST \
     --url '<https://api.immersive-fox.com/v1/avatar_generation/create_instant_avatar/>' \
     --header 'X-Api-Key: <your-api-key>' \
     --header 'Content-Type: multipart/form-data' \
      -F 'file=@my_image.png' \
      -F 'name=John' \
      -F 'gender=Male' \
      -F 'remove_background=false'
{
    "id": 839,
    "thumbnail": "https://storage.googleapis.com/my_bucket_name/avatar_thumbnail/my_thumbnail.png",
    "name": "Smith",
    "gender": "Male",
    "user": 31,
    "remove_background": false,
    "based_on": "Photo",
    "has_hand_wave": false
    "generation_time": 20
}

Create Premium Avatar

A premium avatar is created from a video, resulting in a more realistic and detailed representation. To generate a premium avatar using our API, follow these steps:

  1. Request Presigned URLs: First, request the presigned URLs and corresponding video file names from the presigned URL generation endpoint by specifying the file extensions (e.g., .mp4) for the videos to be uploaded. The response will provide two presigned URLs—one for the silent video and one for the speaking video—allowing direct upload. Additionally, the response will include the file names for both videos, which must be submitted in the next step to generate the premium avatar.

    curl --request POST  \
        --url 'https://api.immersive-fox.com/v1/avatar_generation/premium_avatar_presigned_urls/'  \
        --header 'X-Api-Key: <your-api-key>' \
        --header 'Content-Type: application/json'  \
        --header 'Content-Type: multipart/form-data' \
        -F 'speaking_video_extention=.mp4' \
        -F 'silent_video_extention=.mp4'
    
    {
    "silent_video_data": {
        "presigned_url": "https://premium-avatar-videos.s3.amazonaws.com/silent_videos/31_6f72a1900fd64969ab9f8df465f9e92c.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA6E6ARAOX65ONAQYP%2F20241002%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20241002T221000Z&X-Amz-Expires=1800&X-Amz-SignedHeaders=host&X-Amz-Signature=72058a2c206ba63726eeda2e88266575c046fa0625f9af1c366b4b9bf921b3ef",
        "file_name": "31_6f72a1900fd64969ab9f8df465f9e92c.mp4"
    },
    "speaking_video_data": {
        "presigned_url": "https://premium-avatar-videos.s3.amazonaws.com/speaking_videos/31_1e4eb799a3b84639a11c929a6729a1be.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA6E6ARAOX65ONAQYP%2F20241002%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20241002T221000Z&X-Amz-Expires=1800&X-Amz-SignedHeaders=host&X-Amz-Signature=58e84ccd7d702b64b3400479f27b417f551317ca96afce3e923ac18d9db28bce",
        "file_name": "31_1e4eb799a3b84639a11c929a6729a1be.mp4"
    }
    }
    
  2. Upload Videos using Presigned URLs: To generate a premium avatar, you must upload a speaking video, while the silent video is optional for improving the avatar's quality. Please ensure both videos follow the provided guidelines.

    Use the PUT method with the 'presigned_url' that You get in the previous step, which are valid for 30 minutes. The video files should be uploaded as binary data directly to the URLs within this time frame.

    curl --request PUT  \
        --url 'https://premium-avatar-videos.s3.amazonaws.com/speaking_videos/{file_name}?<presigned_url_parameters>'  \
        --header 'X-Api-Key: <your-api-key>' \
        --header 'Content-Type: video/mp4'  \
        --data-binary '@speaking_video.mp4'
    
    {
    }
    

    curl --request PUT  \
        --url 'https://premium-avatar-videos.s3.amazonaws.com/silent_videos/{file_name}?<presigned_url_parameters>'  \
        --header 'X-Api-Key: <your-api-key>' \
        --header 'Content-Type: video/mp4'  \
        --data-binary '@silent_video.mp4'
    
    {
    }
    
  3. Send Avatar Creation Request: After uploading the videos, use the 'file_name' obtained from the presigned URL request to generate the premium avatar.

    The response will include the 'id' of the newly created premium avatar, which will be used for subsequent bulk video request. Additionally, the response will provide a 'thumbnail' which is preview of the avatar, as well as details such as the 'generation time', 'name', 'gender', and other relevant information.

    Use avatar status api to check the avatar status.

    curl --request POST  \
        --url 'https://api.immersive-fox.com/v1/avatar_generation/create_premium_avatar/'  \
        --header 'X-Api-Key: <your-api-key>' \
        --header 'Content-Type: application/json'  \
        --header 'Content-Type: form-data' \
        -F 'avatar_name=John' \
        -F 'gender=Male' \
        -F 'remove_background=false' \
        -F 'silent_video_name=31_6f72a1900fd64969ab9f8df465f9e92c.mp4'  \
        -F 'speaking_video_name=31_1e4eb799a3b84639a11c929a6729a1be.mp4'
    
    {
        "id": 840,
        "thumbnail": "https://storage.googleapis.com/my_bucket_name/avatar_thumbnail/my_thumbnail.png",
        "name": "John",
        "gender": "Male",
        "user": 31,
        "remove_background": true,
        "based_on": "Video",
        "has_hand_wave": false
        "generation_time": 24 
    }