Catalog ProAPI Docs

Clothing photos

POSThttps://us-central1-aiavatar-01.cloudfunctions.net/businessApi/clothing

Send photos of a garment and choose one of your models. You get back photos of the model wearing it, each in a different pose.

What to send

Send the request as multipart/form-data with your key in the X-Api-Key header.

FieldRequired?What to send
user_idRequiredThe id of your user who is making this request — the same id you use in your own app. It lets you see later how many photos each user made.
model_idRequiredWhich of your models should wear the garment. Get the ids from GET /models.
genderRequiredmale or female — the same as the model you chose.
clothRequiredA photo of the garment (JPG or PNG, up to 8 MB). To send more, add the cloth field again — up to 4, for example front, back and a close-up.
countRequiredHow many photos you want back, from 1 to 5. Each one shows a different pose.
sizeOptional1 for square 1024×1024 (this is the default). 2 for portrait 768×1024.

Example request

curl -X POST "https://us-central1-aiavatar-01.cloudfunctions.net/businessApi/clothing" \
  -H "X-Api-Key: cp_live_xxxxxxxxxxxxxxxx" \
  -F user_id=u_1042 \
  -F model_id=5b0e3f1c-… \
  -F gender=female \
  -F count=3 \
  -F size=2 \
  -F [email protected] \
  -F [email protected]

Example response

You get this straight away. The photos are not ready yet — see Check results.

{
  "job_id": "3c9a71d4-…",            // save this — you'll use it to get the photos
  "status": "queued",                // your request is waiting to start
  "type": "clothing",
  "user_id": "u_1042",
  "model_id": "5b0e3f1c-…",          // the model wearing the garment
  "count": 3,
  "size": 2,
  "balance": { "images_left": 243 }  // photos left on your plan after this request
}

Good to know