Skip to content

Create New Clothing Item

POST
/api/v1/clothing-item

Create a new clothing item by providing images and details. Our AI vision model will help generate an accurate description of your item.

  • clothing_item_name - Provide a user-friendly name for your clothing item
  • description - A description will be automatically generated using AI vision, but any details you provide will improve accuracy, especially for features not visible in the image (e.g., 'oversized fit', 'slim cut', 'high waist')
  • description_back - A separate description for the back of your clothing item. Our AI vision will generate this automatically, but providing details will improve accuracy and performance of generations
  • clothing_item_url - An image of the front of your clothing item
  • clothing_item_back_url - An image of the back of your clothing item (optional - if not provided, front image will be used for back shot generations)
  • use_image_enhancement - Boolean that determines if we process your image by removing backgrounds and generating descriptions (costs 1 credit). Set to false only if you already have a clean flat lay photo and good descriptions. Default is true. Clean images and good descriptions significantly improve generation quality.

Authorizations

HTTPBearer
TypeHTTP (bearer)

Request Body

JSON
{
"clothing_item_name": "",
"description": "",
"description_back": "",
"external_clothing_item_url": "",
"external_clothing_item_back_url": "",
"use_image_enhancement": true
}

Responses

Successful Response
application/json
JSON
{
"clothing_item_id": 0,
"clothing_item_name": "string",
"description": "string",
"description_back": "string",
"clothing_item_url": "string",
"clothing_item_back_url": "string",
"external_clothing_item_url": "string",
"external_clothing_item_back_url": "string",
"created_at": "string",
"updated_at": "string"
}

Samples

cURL
curl -X POST \
'https://api.uwear.ai/api/v1/clothing-item' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.uwear.ai/api/v1/clothing-item', {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/clothing-item';
$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/clothing-item'

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())
Powered by VitePress OpenAPI