Authentication
1. API key generation
If your account is subscribed to the API plan, you will need to get an API key. When selecting the account name at the top right of the screen after logging in, go to the "Profile" item of the account from the exposure menu and generate the API key by executing the "Issuing API Key" at the bottom of the screen. Once activated, the created 'API Secret Key' can no longer be checked, so please copy it separately and manage it safely.
2. Making API videos.
A test image is produced with the issued 'API Key' to check the ID value of the generated image.
- cURL
- Node.js
- Python
curl https://aistudios.com/api/odin/editor/project \
-H "Authorization: ${API KEY}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"scenes":
[{
"AIModel": {
"script": "안녕하세요",
"model": "M000004017",
"clothes": "BG00006160",
"locationX": -0.28,
"locationY": 0.19,
"scale": 1
}
}]
}'
import axios from 'axios'
const token = ${API KEY}
axios.post('https://aistudios.com/api/odin/editor/project',
{
"scenes":
[{
"AIModel": {
"script": "안녕하세요",
"model": "M000004017",
"clothes": "BG00006160",
"locationX": -0.28,
"locationY": 0.19,
"scale": 1
}
}]
},
{
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/editor/project'
body = {
'scenes': [{
"AIModel": {
"script": "안녕하세요",
"model": "M000004017",
"clothes": "BG00006160",
"locationX": -0.28,
"locationY": 0.19,
"scale": 1
}
}]
}
headers = {
'Content-Type': 'application/json',
'Authorization': ${API TOKEN}
}
r = requests.post(url, data=json.dumps(body), headers=headers)