A2E
  1. Generate Avatar Videos
A2E
  • AI Avatar API
  • Get Tokens
    • Obtain Login Token
      POST
    • Get API token
      POST
    • Delete API token
      POST
    • List api tokens
      GET
    • Getting API Tokens (2025 version)
      GET
  • TTS and Voice Clone
    • List Public TTS Options
      POST
    • 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
      POST
    • List One or All Avatars
      POST
    • Obtain the Status of One Avatar Video Task
      POST
    • Obtain the List of Personalized Lip-Sync Models
      GET
    • 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
    • Add Custom Background Image
    • Delete Custom Image
  • 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
    • Face Swap Tasks
      • Add User 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
    • Exchange Diamonds
    • List Available Languages
    • Save URL to A2E's storage
  1. Generate Avatar Videos

Generate AI Avatar Videos

Global Server
https://video.a2e.ai
Global Server
https://video.a2e.ai
POST
/api/v1/video/generate
Quality of the lip-sync: depending on whether you choose to “train a personalized avatar” (in the Add Avatar and Train Lip-sync section), the system will automatically apply either the universal lip-sync model or the dedicated trained lip-sync model for your avatar. If you skip “train a personalized avatar,” the lip-sync results for your avatar will be less realistic compared to using a dedicated lip-sync model trained with your avatar’s video.
Get the id of the avatar as "_id" returned by /api/v1/anchor/character_list.
Why is video generation sometimes slow? Please pay special attention to the parameter isSkipRs, which corresponds to Smart Motion Adjustment in the web UI. Enabling this option enhances the naturalness of the AI avatar’s movements. However, it can significantly slow down the generation process.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
title
string 
optional
The title of video
anchor_id
string 
required
The "_id" returned from the api/v1/anchor/character_list. When you call character_list, remember to set user_video_twin_id and type.
anchor_type
integer 
required
Type of the avatar. 0 is system provided. 1 is user uploaded (custom)
back_id
string 
optional
ID of the system default background image. Do not set this value if you do not want to replace background.
custom_back_id
string 
optional
ID of the custom background image. Do not set this value if you do not want to replace background
color
string 
optional
RGB format string of the color of the custom background image. e.g. rgb(133,137,132)
audioSrc
string 
required
The url of the audio. Get the audio file url from send_tts method. Alternatively, Iif you provide your own audio. You can record the audio by yourself. You can obtain the audio from other TTS vendor such as ElevenLabs.
resolution
integer 
required
Resolution of the video
web_bg_width
integer 
required
Width of the video. Simply set this to 0 if you do not need background matting (e.g. Neither back_id nor custom_back_id is not provide)
web_bg_height
integer 
required
Height of the video. Simply set this to 0 if you do not need background matting (e.g. Neither back_id nor custom_back_id is not provide).
web_people_width
integer 
required
The placement of the avatar within the final image. Width of the avatar. Simply set this to 0 if you do not need background matting (e.g. Neither back_id nor custom_back_id is not provide)
web_people_height
integer 
required
The placement of the avatar within the final image. Height of the avatar. Simply set this to 0 if you do not need background matting (e.g. Neither back_id nor custom_back_id is not provide)
web_people_x
integer 
required
The placement of the avatar in the final video. The x value of the upper left corner of the avatar base,relative to the upper left corner of the video. Simply set this to 0 if you do not need background matting (e.g. Neither back_id nor custom_back_id is not provide)
web_people_y
integer 
required
The placement of the avatar in the final video. The y value of the upper left corner of the avatar base,relative to the upper left corner of the video.
isSkipRs
boolean 
optional
Skip intelligent action adjustment (default true). If you turn this on, your video generation will be significantly slowed down.
anchor_background_img
string 
optional
The url of the original background image corresponding to the avatar, used to matting.
No need to set anchor_background_color if this value is given.
anchor_background_color
string 
optional
RGB format string of the original background color corresponding to the avatar, used to matting. e.g. rgb(0,255,0)
No need to set anchor_background_img if this value is given.
isAllowReverse
string 
optional
Allow Reverse. True is allow.
isToPublicPool
boolean 
optional
(Only useful for dedicated line users)
Whether to send your video generation request to the public computing power pool for inference, true means yes.
As a dedicated line user, there is no monthly video generation limit set by us. Your capacity is determined by how many videos your dedicated lines can process within a month. This endpoint allows you to send video generation requests to the public computing pool when your dedicated lines are occupied. For example, if you have two dedicated lines but three video generation requests are created simultaneously, the third request would typically wait until one of the lines becomes available. However, if you choose to utilize the public pool, all three requests can be processed concurrently, ensuring faster results and increased efficiency.
The requests sent to the public computing pool will consume your coins as regular user's requests. The purpose of sending your requests to the public computing pool is to accelerate the process of your video generation by using more computing resources. But this will increase your cost (you need to prepare enough coins).
isCaptionEnabled
boolean 
optional
Whether to enable captions, true means enabled.
msg
string 
optional
This field contains the audio text content, must provide a valid value when generating captionAlign
captionAlign
object 
optional
This is the font style, which is only effective when isCaptionEnabled equals true.
language
string 
optional
Caption Language.
Example:
en-US
PrimaryColour
string 
optional
RGBA format string of the font primary colour.
Example:
rgba(146, 84, 222, 1)
FontName
string 
optional
Font name,
Currently supported fonts are Arial, AaYuanWeiTuSi, AaFengKuangYuanShiRen, Aozora Mincho, SJbangkaijianti, 337-SSHuaGuangTi, YEFONTZhaoPaiTi, ziticqnananti, ZXFMingKeBen, TangXianBinSong, Luoguocheng-maobixiaoxiankaijia, Kingnamype Yuanmo SC, JMH, huangkaihuaLawyerfont.
Example:
AaFengKuangYuanShiRen
Fontsize
integer 
optional
Font Size.
Example:
50
BorderStyle
integer 
optional
Border Style.
Example:
4
subtitle_position
string 
optional
Subtitle Position,It represents the percentage distance of the font from the bottom of the video, displayed in center alignment.
Example:
0.3
OutlineColour
string 
optional
RGBA format string of the font outline colour.
Example:
rgba(0, 0, 0, 1)
BackColour
string 
optional
RGBA format string of the font back colour.
Example:
rgba(146, 84, 222, 1)
Example
{
  "title": "My first AI video",
  "anchor_id": "660556b3cd492168141926d3",
  "anchor_type": 1,
  "back_id": "62a6d3e56c209514b155b12b",
  "audioSrc": "https://speech_cdn.ai-anchor.com/dubbing_stable/pyK1dvqcDKpKJo1IcEPm_9714_fr.mp3",
  "resolution": 1080,
  "web_bg_width": 853,
  "web_bg_height": 480,
  "web_people_width": 270,
  "web_people_height": 480,
  "web_people_x": 292,
  "web_people_y": 0,
  "isSkipRs": true,
  "isCaptionEnabled": true,
  "captionAlign": {
    "language": "en-US",
    "PrimaryColour": "rgba(247, 89, 171, 1)",
    "OutlineColour": "rgba(0, 0, 0, 1)",
    "BorderStyle": 4,
    "BackColour": "rgba(146, 84, 222, 1)",
    "FontName": "AaFengKuangYuanShiRen",
    "Fontsize": 50,
    "subtitle_position": 0.3
  }
}

Request 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/video/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "title": "My first AI video",
    "anchor_id": "660556b3cd492168141926d3",
    "anchor_type": 1,
    "back_id": "62a6d3e56c209514b155b12b",
    "audioSrc": "https://speech_cdn.ai-anchor.com/dubbing_stable/pyK1dvqcDKpKJo1IcEPm_9714_fr.mp3",
    "resolution": 1080,
    "web_bg_width": 853,
    "web_bg_height": 480,
    "web_people_width": 270,
    "web_people_height": 480,
    "web_people_x": 292,
    "web_people_y": 0,
    "isSkipRs": true,
    "isCaptionEnabled": true,
    "captionAlign": {
        "language": "en-US",
        "PrimaryColour": "rgba(247, 89, 171, 1)",
        "OutlineColour": "rgba(0, 0, 0, 1)",
        "BorderStyle": 4,
        "BackColour": "rgba(146, 84, 222, 1)",
        "FontName": "AaFengKuangYuanShiRen",
        "Fontsize": 50,
        "subtitle_position": 0.3
    }
}'

Responses

🟢200generate
application/json
Body
0 is OK
code
integer 
required
data
object 
required
title
string 
required
msg
string 
required
algo_result
string 
required
result
string 
required
retry
integer 
required
process
integer 
required
isDel
boolean 
required
isSkipRs
boolean 
required
status
string 
required
error
string 
required
anchor_type
string 
required
resolution
string 
required
voice_type
string 
required
audioSrc
string 
required
custom_voice
string 
required
priority
integer 
required
restart_date
null 
required
audioLen
integer 
required
web_people_width
integer 
required
web_people_height
integer 
required
web_people_x
integer 
required
web_people_y
integer 
required
web_bg_width
integer 
required
web_bg_height
integer 
required
color
string 
required
result_cover
string 
deprecated
wl_model
string 
required
anchor_background_img
string 
required
anchor_background_color
string 
required
_id
string 
required
The id of the video. e.g. 652d00b8a71c91a83bba6195
user_id
string 
required
anchor_id
string 
required
web_dist_bg_width
integer 
required
web_dist_bg_height
integer 
required
web_dist_bg_x
integer 
required
web_dist_bg_y
integer 
required
replace_bg_id
string 
required
version
integer 
required
createdAt
string 
required
updatedAt
string 
required
__v
integer 
required
Example
{
  "code": 0,
  "data": {
    "title": "202404071749",
    "msg": "",
    "algo_result": "",
    "result": "",
    "retry": 0,
    "process": 0,
    "isDel": false,
    "isSkipRs": false,
    "status": "start",
    "error": "",
    "anchor_type": "1",
    "resolution": "1080",
    "voice_type": "0",
    "audioSrc": "https://dh24as48lv9ce.cloudfront.net/ai/speech/tts/azure_service/azure_synth.-8161556380964742732.wav",
    "custom_voice": "",
    "priority": 4,
    "restart_date": null,
    "audioLen": 5,
    "web_people_width": 608,
    "web_people_height": 1080,
    "web_people_x": 657,
    "web_people_y": 0,
    "web_bg_width": 1920,
    "web_bg_height": 1080,
    "color": "",
    "result_cover": "",
    "wl_model": "WLGPNormal",
    "anchor_background_img": "",
    "anchor_background_color": "",
    "_id": "6613b4c216004c1df435d6ff",
    "user_id": "637498294abbb165572d5dbe",
    "anchor_id": "660556b3cd492168141926d3",
    "web_dist_bg_width": -2,
    "web_dist_bg_height": -2,
    "web_dist_bg_x": 0,
    "web_dist_bg_y": 0,
    "replace_bg_id": "62a6d3e56c209514b155b12b",
    "version": 1,
    "createdAt": "2024-04-08T09:11:30.329Z",
    "updatedAt": "2024-04-08T09:11:30.329Z",
    "__v": 0
  }
}
Modified at 2025-03-25 11:10:07
Previous
Delete a User Voice
Next
List of Result Videos
Built with