Catalog ProAPI Docs

Product photos

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

Send photos of a product. You get back clean photos of it on a plain white background, each from a different angle.

What to send

Send the request as multipart/form-data (the normal way to upload files) 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. Letters, numbers and . _ - @ : only.
photoRequiredA photo of the product (JPG or PNG, up to 8 MB). To send more than one, add the photo field again — up to 6. More angles of the real product give better results.
countRequiredHow many photos you want back, from 1 to 5. Each one shows the product from a different angle.
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/products" \
  -H "X-Api-Key: cp_live_xxxxxxxxxxxxxxxx" \
  -F user_id=u_1042 \
  -F count=4 \
  -F size=1 \
  -F [email protected] \
  -F [email protected]

Example response

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

{
  "job_id": "8f21c0e2-…",            // save this — you'll use it to get the photos
  "status": "queued",                // your request is waiting to start
  "type": "product",
  "user_id": "u_1042",               // the user you sent
  "model_id": null,                  // not used for products
  "count": 4,                        // photos you asked for
  "size": 1,
  "balance": { "images_left": 246 }  // photos left on your plan after this request
}

Good to know