Workflow
Create a job.
POST /api/v2/jobs/sync for one image of at most 20 MB. The response is the finished job (200) when processing completes within 30 seconds.
POST /api/v2/jobs for a video, a ZIP, or any file that must not block the caller. The response is 202 and the job is queued.
If status is queued or processing, wait the number of seconds in retryAfter (also sent as the Retry-After header), then GET /api/v2/jobs/{id}. Repeat that poll until status is succeeded or failed. Do not download before that. retryAfter is absent once the job is terminal.
When status is succeeded, download using the job id (responses never embed URLs or paths):
GET /api/v2/jobs/{id}/result for the anonymized image, video, or ZIP.
GET /api/v2/jobs/{id}/detections only if generateJsonDetections was true. When status is failed, read error.code and error.message. There is no file to download.
A sync call that accepts the image but does not finish within 30 seconds returns 502 EXTERNAL_SERVICE_ERROR. The job still exists: poll GET /api/v2/jobs/{id} with the id from the error details.
Call GET /api/v2/account first if you need the accepted media types, the credit balance, or the jobs-per-minute limit.
Last updated