---
title: Documentation
description: Complete SegmentationAPI reference for uploading media, creating jobs, and retrieving SAM 3 results.
---

SegmentationAPI is a hosted SAM 3 pipeline. Upload media, submit text prompts, and download masks through a few authenticated REST calls. The production origin is `https://api.segmentationapi.com`. Keys come from the [dashboard](https://app.segmentationapi.com).

## Three-step flow

1. **Upload.** `POST /v1/uploads/presign`, then PUT the file to the returned URL. Keep the `taskId`.
2. **Segment.** `client.jobs.create()` (or `POST /v1/jobs`) with that task ID and one or more prompts.
3. **Download.** Poll until the job succeeds, then `client.jobs.results.retrieve()` or the archive download endpoints.

Field-level request and response shapes live in the [API reference](/docs/api). Do not copy endpoint tables out of this guide; the OpenAPI file is the source of truth.

## Playground and SDKs

Use the dashboard as the playground: create a key, run a trial job, and inspect results. For application code, start with [`@segmentationapi/sdk`](/docs/sdks):

```ts
import { SegmentationAPI } from "@segmentationapi/sdk";

const apiKey = process.env.SEGMENTATION_API_KEY;
if (!apiKey) {
  throw new Error("SEGMENTATION_API_KEY is required");
}

const client = new SegmentationAPI({ apiKey });
const upload = await client.uploads.create({ contentType: "image/png" });
```

See [SDKs](/docs/sdks) for the full upload → job → download sample.

## Next

- [Authentication](/docs/authentication)
- [Free API trial](/docs/free-api-trial)
- [Upload](/docs/upload)
- [OpenAPI](/openapi.json)
