Export Custom Avatar
The custom avatar export function describes the process of outputting video through an API request in JSON format so that video can be produced using custom avatars created by users.
1. API endpoint
https://app.aistudios.com/api/odin/v3/simple/custom
2. Request parameter
key | desc | type | required | default |
---|---|---|---|---|
language | Language of the script you created | String | true | - |
text | The script that the model will utter | String | true | - |
model | ID of the custom avatar model to use | String | true | - |
isExport | Whether this project will be exported. Expose to the project if false | Boolean | false | true |
webhookUrl | Address to send composite results | String | false | - |
3. Response parameters
key | desc | type |
---|---|---|
projectId | Project ID of the chroma key that made the export request | String |
taskId | Task ID that made the export request | String |
4. Sample Request
- cURL
- Node.js
- Python
curl https://app.aistudios.com/api/odin/v3/simple/custom \
-H "Authorization: ${API KEY}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"language": "en",
"text": "Sample Script",
"model": "M000045058",
"webhookUrl": ${webhook_delivery_address}
}'
import axios from "axios";
const token = ${API KEY};
const customWebhookUrl = ${webhook_delivery_address};
axios.post('https://app.aistudios.com/api/odin/v3/simple/custom',
{
"language": "en",
"text": "Sample Script",
"model": "M000045058",
"webhookUrl": `${customWebhookUrl}`
},
{
headers: {
'Authorization': ${token},
'Content-Type': 'application/json'
}
}
)
.then((res) => {
console.log(res.data);
})
.catch((error) => {
console.error(error);
})
import requests
import json
url = "https://app.aistudios.com/api/odin/v3/simple/custom"
body = {
"language": "en",
"text": "Sample Script",
"model": "M000045058",
"webhookUrl": ${webhook_delivery_address}
}
headers = {
"Content-Type": "application/json",
"Authorization": ${API TOKEN}
}
r = requests.post(url, data=json.dumps(body), headers=headers)