The resources (image, video, voice) generated by our API are valid for 7 days. Please save the relevant resources as soon as possible to prevent expiration.
First you need to generate the voice through the following method or directly provide a link to the available voice file
If you want to use the system’s sound model to generate speech, you need to generate a link by calling the interface Create TTS
If you want to use the sound model you provide to generate speech, you need to generate a link by calling the interface Create Voice Clone
Secondly, you need to provide an avatar link, which can be a picture or video.
If you want to use the avatar provided by the system, you can obtain it through the interface Get Avatar List
Then, you need to generate an avatar video by calling the API Create Avatar Video
Finally,The processing status will be returned promptly through the provided callback address, or you can also query it by calling the interface Get Video Info
Interface returns business status code(1000:success)
msg
String
OK
Interface returns status information
data
Array
[{ avatar_id: "xx", url: "", status: "" }]
avatar_id: Used by avatar interface and creating avatar interface. url: You can preview the avatar via the link. status: 1-queueing 2-processing),3:completed 4-failed
Avatar resource link. It is recommended that the video be about one minute long, and the avatar in the video content should rotate at a small angle and be clear.
avatar_id
String
avatar unique ID,Can only contain /^a-zA-Z0-9/.
name
String
Avatar display name for easier identification and management.
type
Number
1,2
Avatar type, 1 represents real avatar, 2 represents stream avatar, When type is 2, you need to wait until status is 3 before you can use it, You can get the current status in real time through the interface https://openapi.akool.com/api/open/v3/avatar/create.
url_from
Number
1,2
url source, 1 means akool and other links, 2 means other third-party links (currently only supports YouTube / TikTok / X / Google Drive)
Response Attributes
Parameter
Type
Value
Description
code
int
1000
Interface returns business status code(1000:success)
msg
String
OK
Interface returns status information
data
Array
[{ avatar_id: "xx", url: "", status: 1 }]
avatar_id: Used by creating live avatar interface. url: You can preview the avatar via the link. status: 1-queueing, 2-processing, 3-success, 4-failed
{ "code": 1000, "msg": "OK", "data": { "faceswap_quality": 2, "storage_loc": 1, "_id": "64dd92c1f0b6684651e90e09", "create_time": 1692242625334, "uid": 378337, "type": 2, "from": 1, "video_id": "0acfed62e24f4cfd8801c9e846347b1d", "video_lock_duration": 7.91, "deduction_lock_duration": 10, "video_status": 2, // current status of video: 【1:queueing(The requested operation is being processed),2:processing(The requested operation is being processing),3:completed(The request operation has been processed successfully),4:failed(The request operation processing failed, the reason for the failure can be viewed in the video translation details.)】 "external_video": "", "video": "" // Generated video resource url }}
Response Code Description
Please note that if the value of the response code is not equal to 1000, the
request is failed or wrong
Parameter
Value
Description
code
1000
Success
code
1003
Parameter error or Parameter can not be empty
code
1006
Your quota is not enough
code
1109
create avatar video error
code
1102
Authorization cannot be empty
code
1200
The account has been banned
code
1201
Create audio error, please try again later
Assistant
Responses are generated using AI and may contain mistakes.