Export Chromakey Video
The chromakey 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://aistudios.com/api/odin/simple/video
2. Request parameter
key | desc | type | required | default |
---|---|---|---|---|
language | The language the script is written in. | String | true | - |
text | Text for AI to read. It must match the language of the model. | String | true | - |
model | The AI Model to be used. | String | true | - |
clothes | The clothes that the AI Model will wear. | String | true | - |
locale | The environment where the user is accessing the API. For users accessing from China, the value should be 'zh' | String | false | - |
uppercut | How much the area above model should be cropped in a chromakey video. | Number | false | - |
webhook | The address where the synthesis result should be sent. | String | false | - |
3. Response parameters
key | desc | type |
---|---|---|
success | Progress on Request Success | Boolean |
key | Project Id - used when fetching Chromakey/Audio export data. | String |
4. Sample Request
- cURL
- Node.js
- Python
curl https://aistudios.com/api/odin/simple/video \
-H "Authorization: ${API KEY}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"language":"ko",
"text":"샘플 스크립트",
"model": "ysy",
"clothes": "1",
"webhook": ${webhook_delivery_address}
}'
import axios from "axios"
const token = ${API KEY}
axios.post('https://aistudios.com/api/odin/simple/video',
{
"language":"ko",
"text":"샘플 스크립트",
"model": "ysy",
"clothes": "1",
"webhook": ${webhook_delivery_address}
},
{
headers: {
'Authorization': ${token},
'Content-Type': 'application/json'
}
}
)
.then((res) => {
console.log(res.data)
})
.catch((error) => {
console.error(error)
})
import requests
import json
url = "https://aistudios.com/api/odin/simple/video"
body = {
"language": "ko",
"text": "샘플 스크립트",
"model": "ysy",
"clothes": "1",
"webhook": ${webhook_delivery_address}
}
headers = {
"Content-Type": "application/json",
"Authorization": ${API TOKEN}
}
r = requests.post(url, data=json.dumps(body), headers=headers)