Talking Avatar API documentation
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization. getToken |
Parameter | Type | Value | Description |
---|---|---|---|
from | Number | 2、3 | 2 represents the official avatar of Akool, 3 represents the avatar uploaded by the user themselves,If empty, returns all avatars by default. |
type | Number | 1、2 | 1 represents the talking avatar of Akool, 2 represents the streaming avatar of Akool,If empty, returns all avatars by default. |
page | Number | 1 | Current number of pages,Default is 1. |
size | Number | 10 | Current number of returns per page,Default is 100. |
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: "" }] | avatar_id: Used by avatar interface and creating avatar interface. url: You can preview the avatar via the link. |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken. |
Parameter | Type | Value | Description |
---|---|---|---|
width | Number | 3840 | Set the output video width,must be 3840 |
height | Number | 2160 | Set the output video height,must be 2160 |
avatar_from | Number | 2 or 3 | You use the avatar from of the avatar model, and you can get from https://openapi.akool.com/api/open/v3/avatar/list api, you will obtain the field 【from】 and pass it here. If you provide an avatar URL yourself, avatar_from must be 3. |
webhookUrl | String | Callback url address based on HTTP request. | |
elements | [Object] | Collection of elements passed in in the video | |
[elements].url | String | Link to element(When type is equal to image, url can be either a link or a Hexadecimal Color Code). When avatar_from =2, you don’t need to pass this parameter. The image formats currently only support “.png”, “.jpg”, “.jpeg”, “.webp”, and the video formats currently only support “.mp4”, “.mov”, “.avi” | |
[elements].scale_x | Number | 1 | Horizontal scaling ratio(Required when type is equal to image or avatar) |
[elements].scale_y | Number | 1 | Vertical scaling ratio (Required when type is equal to image or avatar) |
[elements].offset_x | Number | Horizontal offset of the upper left corner of the element from the video setting area (in pixels)(Required when type is equal to image or avatar) | |
[elements].offset_y | Number | Vertical offset of the upper left corner of the element from the video setting area (in pixels)(Required when type is equal to image or avatar) | |
[elements].height | Number | The height of the element | |
[elements].width | Number | The width of the element | |
[elements].type | String | Element type(avatar、image、audio) | |
[elements].avatar_id | String | When type is equal to avatar, you use the avatar_id of the avatar model, and you can get from https://openapi.akool.com/api/open/v3/avatar/list api, you will obtain the field 【avatar_id】 and pass it here。 If you provide an avatar URL yourself, you don’t need to pass this parameter. |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code (1000:success) |
msg | String | Interface returns status information | |
data | Object | { _id:"", video_status:3, video:"" } | _id : Interface returns data status: the status of video: 【1:queueing, 2:processing, 3:completed, 4:failed】, video : the url of Generated video |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken. |
Parameter | Type | Value | Description |
---|---|---|---|
video_model_id | String | NULL | video db id: You can get it based on the _id field returned by https://openapi.akool.com/api/open/v3/talkingavatar/create . |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | OK | Interface returns status information |
data | Object | { video_status:1, _id:"", video:"" } | video_status: the status of video:【1:queueing, 2:processing, 3:completed, 4:failed】 video: Generated video resource url _id: Interface returns data |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization. getToken |
Parameter | Type | Value | Description |
---|---|---|---|
id | String | avatar record id. |
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: "" }] | 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 |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer token | Your API Key used for request authorization. getToken |
Parameter | Type | Value | Description |
---|---|---|---|
url | String | 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/. | |
type | String | 1 | Avatar type, 1 represents talking avatar |
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 |
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 |