Appearance
Create New Generation
POST
/api/v1/generation
Create a new generation request for a clothing item. The generation will create new images of the clothing item worn by a virtual model, based on your prompt and camera angle.
clothing_item_id
- ID of the clothing item to generate images fornum_images
- How many images to generate (1-5)prompt
- Describe the image you would like to generate by emphasizing the human model descriptioncamera
- Use natural language to describe the camera angle you would like. We typically use "full body shot", "mid shot", "back shot", "3-4 shot" and "lower body shot".
Authorizations
HTTPBearer
TypeHTTP (bearer)
Request Body
JSON
{
"clothing_item_id": 0,
"num_images": 0,
"prompt": "string",
"camera": "string"
}
Responses
Successful Response
application/json
JSON
{
"generation_id": 0,
"clothing_item_id": 0,
"num_images": 0,
"payload": "string",
"status": "string",
"feature_name": "string",
"created_at": "string",
"updated_at": "string"
}
POST
/api/v1/generation
Samples
cURL
curl -X POST \
'https://api.uwear.ai/api/v1/generation' \
-H "Content-Type: application/json"
JavaScript
fetch('https://api.uwear.ai/api/v1/generation', {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/generation';
$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/generation'
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers)
print(response.json())