Catalog ProAPI Docs

Check results

GEThttps://us-central1-aiavatar-01.cloudfunctions.net/businessApi/jobs/{job_id}

Tells you whether your photos are ready. When they are, it gives you a link to each photo.

What to send

Header / pathRequired?What to send
X-Api-KeyRequiredYour API key, as a header.
job_idRequiredThe job_id you got back when you made the request. It goes in the address, like /jobs/8f21c0e2-…

When to call it

Photos take about 1–3 minutes. Don't keep your user waiting — tell them their photos are being made, and check back from your server in the background.

Check once every 15 seconds — don't keep calling

Wait 15 seconds between checks of the same job. Please don't call it in a loop or every second: it won't make the photos any faster, and a job checked more often than every 10 seconds gets a 429 TOO_MANY_REQUESTS answer until you slow down.

// Node.js — check a job once every 15 seconds until it's done
async function waitForPhotos(jobId) {
  while (true) {
    const res = await fetch(`${BASE}/jobs/${jobId}`, { headers: { "X-Api-Key": KEY } });
    const job = await res.json();
    if (job.status === "completed" || job.status === "failed") return job;
    await new Promise((r) => setTimeout(r, 15000));  // wait 15 seconds before the next check
  }
}

Example request

curl "https://us-central1-aiavatar-01.cloudfunctions.net/businessApi/jobs/8f21c0e2-…" \
  -H "X-Api-Key: cp_live_xxxxxxxxxxxxxxxx"

Example response

{
  "job_id": "8f21c0e2-…",
  "status": "completed",        // queued → processing → completed (or failed)
  "type": "product",
  "user_id": "u_1042",
  "model_id": null,
  "count": 4,                   // photos you asked for
  "completed": 4,               // photos made so far
  "size": 1,
  "images": [                   // your photos — download and save these
    { "url": "https://…", "width": 1024, "height": 1024, "position": 0 }
  ],
  "warnings": null,             // says so here if some photos couldn't be made
  "error": null,                // why it failed, if status is "failed"
  "created_at": 1790611200000,
  "completed_at": 1790611337000,
  "expires_at": 1793203200000,  // the photos are deleted after this time
  "balance": { "images_left": 246 }
}

What the status means

StatusMeaning
queuedWaiting to start. Check again later.
processingBeing made right now. Check again later.
completedDone. Download the photos in images.
failedNo photo could be made. Nothing was charged — error says why.
Save your photos

Photos are deleted 30 days after they're made (see expires_at). Download them to your own storage as soon as the status is completed — don't link to our URLs from your app.

List your requests

GEThttps://us-central1-aiavatar-01.cloudfunctions.net/businessApi/jobs

Your recent requests, newest first, 50 per page. Handy if you lost a job_id.

QueryRequired?What to send
user_idOptionalOnly show this user's requests.
statusOptionalOnly show queued, processing, completed or failed requests.
typeOptionalOnly show product or clothing requests.
pageOptionalWhich page to show, starting at 1.
curl "https://us-central1-aiavatar-01.cloudfunctions.net/businessApi/jobs?user_id=u_1042&page=1" \
  -H "X-Api-Key: cp_live_xxxxxxxxxxxxxxxx"
{
  "jobs": [ … ],  // each one looks like the response above
  "page": 1,      // the page you're on
  "pages": 3,     // how many pages there are
  "total": 131,   // how many requests in total
  "page_size": 50
}