Create Dream Avatar
Create a dream avatar using an image.
1. API endpoint
POST https://app.aistudios.cn/api/odin/v3/avatars/dreamavatar
2. Request parameter
key | desc | type | required | default |
---|---|---|---|---|
url | Image URL | String | true | - |
name | Name of the dream avatar | String | true | - |
gender | Gender of the dream avatar | String enum (MALE, FEMALE) | true | - |
tts | TTS of the dream avatar | Json | false | null |
3. Response parameters
key | desc | type |
---|---|---|
avatarId | ID of the created dream avatar | String |
4. Sample Request
- cURL
- Node.js
- Python
curl https://app.aistudios.cn/api/odin/v3/avatars/dreamavatar \
-H "Authorization: ${API KEY}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"url": "https://cdn.aistudios.com/uploads/models/en/M000351175_BG00001308.png",
"name": "Ian",
"gender": "MALE"
}'
import axios from "axios";
const token = ${API KEY};
axios.post('https://app.aistudios.cn/api/odin/v3/avatars/dreamavatar',
{
"url": "https://cdn.aistudios.com/uploads/models/en/M000351175_BG00001308.png",
"name": "Ian",
"gender": "MALE"
},
{
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.cn/api/odin/v3/avatars/dreamavatar"
body = {
"url": "https://cdn.aistudios.com/uploads/models/en/M000351175_BG00001308.png",
"name": "Ian",
"gender": "MALE"
}
headers = {
"Content-Type": "application/json",
"Authorization": ${API TOKEN}
}
r = requests.post(url, data=json.dumps(body), headers=headers)