> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.segmentationapi.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.segmentationapi.com/_mcp/server.

# Results

> Request a results archive, poll until it is ready, and read output_manifest.json to retrieve image and video segmentation masks.

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](/api-reference).

## Signed result

```ts
const result = await client.jobs.retrieveJobResult({ jobId: job.jobId });
```

```bash
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

```ts
await client.jobs.createJobDownload({ jobId: job.jobId });

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

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`.