Appearance
Save Avatar
POST
/api/v1/avatar
Create a new avatar. You can create an avatar by providing a name and referencing a previously generated image via generation_result_id
.
avatar_name
- A user-friendly name for your avatar.generation_result_id
- The ID of a previously generated image result to use for creating the avatar.
Authorizations
HTTPBearer
TypeHTTP (bearer)
Request Body
JSON
{
"avatar_name": "",
"generation_result_id": 0
}
Responses
Successful Response
application/json
JSON
{
"avatar_id": 0,
"avatar_name": "string",
"avatar_url": "string",
"avatar_description": {
"additionalProperties": "string"
},
"count_generation_results": 0,
"generation_result_id": 0,
"created_at": "string",
"updated_at": "string"
}
POST
/api/v1/avatar
Samples
cURL
curl -X POST \
'https://api.uwear.ai/api/v1/avatar' \
-H "Content-Type: application/json"
JavaScript
fetch('https://api.uwear.ai/api/v1/avatar', {method:'POST',headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
PHP
<?php
$url = 'https://api.uwear.ai/api/v1/avatar';
$method = 'POST';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Python
import requests
url = 'https://api.uwear.ai/api/v1/avatar'
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers)
print(response.json())