- AI Avatar API
- Get Tokens
- TTS and Voice Clone
- Generate Avatar Videos
- Create Avatars and Train Lip-sync Models
- Background Matting and Replacement
- Face Swap
- AI Dubbing
- Image to Video
- Caption Removal
- Streaming Avatar
- Miscellaneous
Generate AI Avatar Videos
Global Server
Global Server
POST
/api/v1/video/generate
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
anchor_id
stringÂ
required
anchor_type
integerÂ
required
back_id
stringÂ
optional
custom_back_id
stringÂ
optional
color
stringÂ
optional
audioSrc
stringÂ
required
resolution
integerÂ
required
web_bg_width
integerÂ
required
web_bg_height
integerÂ
required
web_people_width
integerÂ
required
web_people_height
integerÂ
required
web_people_x
integerÂ
required
web_people_y
integerÂ
required
isSkipRs
booleanÂ
optional
anchor_background_img
stringÂ
optional
No need to set anchor_background_color if this value is given.
anchor_background_color
stringÂ
optional
No need to set anchor_background_img if this value is given.
isAllowReverse
stringÂ
optional
isToPublicPool
booleanÂ
optional
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.
isCaptionEnabled
booleanÂ
optional
msg
stringÂ
optional
captionAlign
objectÂ
optional
language
stringÂ
optional
Example:
en-US
PrimaryColour
stringÂ
optional
Example:
rgba(146, 84, 222, 1)
FontName
stringÂ
optional
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
Example:
50
BorderStyle
integerÂ
optional
Example:
4
subtitle_position
stringÂ
optional
Example:
0.3
OutlineColour
stringÂ
optional
Example:
rgba(0, 0, 0, 1)
BackColour
stringÂ
optional
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
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