A2E
  1. Create Avatars and Train Lip-sync Models
A2E
  • AI Avatar API
  • Get Tokens
    • Getting API Tokens (2025 version)
  • TTS and Voice Clone
    • List Public TTS Options
      GET
    • List Voice Clone Options
      GET
    • Train TTS Model of The User's Voice (Voice Clone)
      POST
    • List Ongoing Voice Clone Tasks
      GET
    • Generate TTS Audio (Text-to-Speech)
      POST
    • Get Details of a Voice
      GET
    • Delete a User Voice
      DELETE
  • Generate Avatar Videos
    • Generate AI Avatar Videos
      POST
    • List of Result Videos
      GET
    • List One or All Avatars
      GET
    • Obtain the Status of One Avatar Video Task
      POST
    • Delete or Cancel a Video
      DELETE
    • Auto Language Detect
      POST
    • Auto Swith to Public Computing Pool
      POST
  • Create Avatars and Train Lip-sync Models
    • Create A Custom Avatar by a Video or an Image
      POST
    • Train a Personalized Lip-sync Model (Optional) a.k.a. Continue Training šŸ’ 
      POST
    • Remove A Customized Avatar
      POST
    • Get Status of All Tasks
      GET
    • Get All Ongoing "Training" Tasks
      GET
    • Status of One Task
      GET
    • Clone Voice from a Video
      POST
  • Background Matting and Replacement
    • Obtain the List of Background Images
      POST
    • Add Custom Background Image
      POST
    • Delete Custom Image
      POST
  • Face Swap
    • Manage Face Swap Resource
      • Add Face Swap Image
      • Get Records of Face Swap Images
      • Delete User Face Swap Image
    • Quickly Preview Face Swap
      • Add User Face Swap Preview
      • Get Status of Face Swap Preview Process
    • Start and Manage Face Swap Tasks
      • Start a Face Swap Task
      • Get Status of Face Swap Task
      • Get Face Swap Task Records
      • Get Details of Face Swap
      • Delete Record
  • AI Dubbing
    • Start dubbing
    • List Dubbing Tasks
    • List All Processing Dubbing Tasks
    • Get Details
    • Delete Record
  • Image to Video
    • Start Image-to-Video
    • Check Status of One Task
    • List Status of All Tasks
    • Delete Record
  • Caption Removal
    • Start Caption Removal
    • Get Records of All Tasks
    • Get Status of All Tasks in Processing
    • Get Details of One Task
    • Delete a Task
  • Streaming Avatar
    • Get All avatars
    • Get a Streaming Avatar Token
    • Set QA Context
    • Get QA Context
    • Ask a Question to the Avatar
    • Let the Avatar Speak Directly
    • Leave the Room
  • Miscellaneous
    • Add a User
    • Get User Remaining Credits
    • List Available Languages
    • Save URL to A2E's storage
    • Add Watermark to Video or Image
    • Get R2 Upload Presigned URL
  • Text to Image
    • Start Text-to-Image
    • List Tasks of Text-to-Image Tasks
    • Get Details of One Task
    • Delete Record
    • Quick Add Avarar
  • Talking Photo
    • Start a Task
    • List Tasks
    • Get Task Detail
    • Delete Task
  • Virtual Try-On
    • Start Virtual Try-On
    • List Tasks of Virtual Try-On
    • Get Details of One Task
    • Delete Record
  • Video to Video
    • Start Video to Video
    • List Tasks of Video to Video
    • Get Details of One Task
    • Delete Record
  • Product Avatar
    • Start Product Avatar
  1. Create Avatars and Train Lip-sync Models

Create A Custom Avatar by a Video or an Image

Global Server
https://video.a2e.ai
Global Server
https://video.a2e.ai
POST
/api/v1/userVideoTwin/startTraining
This API is equivalent to "AI Avatar from Videos" and "AI Avatar from Images" in our website.
Read the tutorial for how to film the best training videos.
Video Avatar (Recommended): provide "video_url"
Upload a video of yourself using "video_url". The video will be the base asset for all your AI generated videos. Upload a video of yourself in MP4 or MOV format. It can be either horizontal or vertical, with no size limitations. The video length should be at least 5 seconds. This video will serve as the foundation for all your subsequent AI-generated character videos. Ensure that the person in the video is clear and attractive.
(Optional) If you are unsatisfied with the lip-sync quality of the AI video, please check if your video meets are the requirements (read below). if you uploaded video meets the requirements, you can use "continueTraining" API (requires 100 credits). Wait for 30 minutes, and the avatar AI model will be automatically updated for better lip-sync quality.
Common issues:
The mime type of your video URL must be set correctly (e.g. video/mp4). We use the mime of the URL header to determine the file type, not the suffix of the URL. If you use an object storage service of a popular cloud service (e.g. S3 of AWS), the mime is usually automatically set.
No space is allowed in the URL
Address redirect is not allowed (i.e. 3xx response code of the http request). This is a common issue if someone provides a http link, but later his server redirects the http address to a https address.
Image Avatar: provide "image_url"
Note: The video / image must contain only one face.
Price:
Creating avatar from a video is free. Creating avatar from an image takes 30 credits. If you do not have enough credits, check out pricing page to learn how to recharge.
When the training is completed, the API will be automatically uploaded to the user avatar.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Example
{
    "name":"dubbing demo",
    "gender":"female",
    // "image_url": "https://d1tzkvq5ukphug.cloudfront.net/adam2eve/stable/video_twin/63076d83-d345-4caa-be8a-19fc7c9338c8.png",
    "video_url":"http://XXXXX/cache/videoplayback%20%2816%29.mp4",
    "video_backgroud_color":"rgb(61,165,82)"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://video.a2e.ai/api/v1/userVideoTwin/startTraining' \
--header 'x-lang: en-US' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name":"dubbing demo",
    "gender":"female",
    // "image_url": "https://d1tzkvq5ukphug.cloudfront.net/adam2eve/stable/video_twin/63076d83-d345-4caa-be8a-19fc7c9338c8.png",
    "video_url":"http://XXXXX/cache/videoplayback%20%2816%29.mp4",
    "video_backgroud_color":"rgb(61,165,82)"
}'

Responses

🟢200startTraining
application/json
Body

Example
{
    "code": 0,
    "data": {
        "_id": "67bd583f7b4ae10c76393899",
        "name": "test",
        "gender": "female",
        "image_url": "",
        "video_url": "https://d1tzkvq5ukphug.cloudfront.net/adam2eve/beta/users/665da3d7bcf6ab778bad0f6a/1e5fa88b-806c-4777-b2c0-0595be2a0e1e.mp4",
        "current_status": "initialized",
        "failed_code": "",
        "failed_message": "",
        "wl_model": "live_protrait",
        "close_mouth_path": "",
        "task_id": "",
        "task_status": "",
        "task_result": {},
        "video_backgroud_image": "",
        "video_backgroud_color": "rgb(61,165,82)",
        "image_result_url": "",
        "image_error_code": "",
        "sent_time": null,
        "preview_result_url": "",
        "version": 1,
        "isSilent": false,
        "hasVoiceClone": false,
        "hasVideoClone": false,
        "skipPreview": false,
        "isToPublicPool": false,
        "image_version": 2,
        "hasEyecontact": false,
        "eyecontact_result_url": ""
    }
}
Modified atĀ 2025-08-08 08:13:54
Previous
Auto Swith to Public Computing Pool
Next
Train a Personalized Lip-sync Model (Optional) a.k.a. Continue Training šŸ’ 
Built with