Async & polling
Create calls return immediately with an asset and its task state. Poll until it is done, or register a webhook.
0 Queued1 Processing2 Succeeded3 Failed
On success, files holds short-lived signed URLs for the outputs (model, image, thumbnail, textures).
Poll until done
poll
curl https://api.picoberry.ai/v1/assets/019f3a39-… \
-H "Authorization: Bearer pb_live_xxx"import time, requests
while True:
a = requests.get(f"https://api.picoberry.ai/v1/assets/{id}", headers=headers).json()["data"]
if a["taskStatus"] in (2, 3): break
time.sleep(4)
model_url = a["files"]["model"]let a;
do {
a = (await (await fetch(`${BASE}/v1/assets/${id}`, { headers })).json()).data;
if (a.taskStatus < 2) await new Promise(r => setTimeout(r, 4000));
} while (a.taskStatus < 2);
const modelUrl = a.files.model;Set a generous timeout A 3D job typically takes ~60–120s. Poll every few seconds and keep polling well past a minute before treating a job as stuck.