Export Chroma key Video
The chroma-key export section shows how to send an API request in JSON format to export a chormakey video that only contains the AI Model.
1. API endpoint
https://app.aistudios.com/api/odin/v3/simple/video
2. Request parameter
key | desc | type | required | default |
---|---|---|---|---|
language | The langauge the script is written in. | String | true | - |
text | Text for AI to read. It must match the langauge of your selected model. | String | true | - |
model | Ther AI Model to be used. | String | true | - |
clothes | Clothes that the AI Model will wear. | String | true | - |
ttsType | External TTS information that is not the default voice of the model. | Json | false | - |
isExport | Whether this project will be exported | Boolean | false | false |
webhookUrl | Url address where the synthesis result should be sent. | String | false | - |
3. Response parameters
key | desc | type |
---|---|---|
projectId | Project Id - Fetching the Chroma-key video data that has been exported. | String |
4. Sample Request
- cURL
- Node.js
- Python
curl https://app.aistudios.com/api/odin/v3/simple/video \
-H "Authorization: ${API KEY}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"language": "en",
"text": "Sample Script",
"model": "M000045058",
"clothes": "BG00002320",
"isExport" : true,
"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/video',
{
"language": "en",
"text": "Sample Script",
"model": "M000045058",
"clothes": "BG00002320",
"isExport" : true,
"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/video"
body = {
"language": "en",
"text": "Sample Script",
"model": "M000045058",
"clothes": "BG00002320",
"isExport" : true,
"webhookUrl": ${webhook_delivery_address}
}
headers = {
"Content-Type": "application/json",
"Authorization": ${API TOKEN}
}
r = requests.post(url, data=json.dumps(body), headers=headers)