Results

Job status never includes masks. After success, either fetch signed result URLs or build a zip archive. Operations: retrieveJobResult, createJobDownload, retrieveJobDownload in the API reference.

Signed result

1const result = await client.jobs.retrieveJobResult({ jobId: job.jobId });
$curl -X GET https://api.segmentationapi.com/v1/jobs/job-abc-987/result \
> -H "Authorization: Bearer YOUR_SEGMENTATION_API_KEY"

URLs expire after expiresIn seconds. A job that has not succeeded yet returns 409 result_not_ready.

Archive

1await client.jobs.createJobDownload({ jobId: job.jobId });
2
3let download = await client.jobs.retrieveJobDownload({ jobId: job.jobId });
4while (download.status !== "ready") {
5 await new Promise((resolve) => setTimeout(resolve, (download.retryAfterSeconds ?? 2) * 1000));
6 download = await client.jobs.retrieveJobDownload({ jobId: job.jobId });
7}

The zip contains output_manifest.json plus artifacts. Image items list per-instance PNG masks. Video items point masks at a per-frame COCO-RLE file. A preview PNG or MP4 appears when generatePreview was true.

Calling GET before POST returns 404 download_not_requested. Requesting a download before the job is success returns 409 job_not_downloadable.