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

# Documentation

> 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.createJob()` (or `POST /v1/jobs`) with that task ID and one or more prompts.
3. **Download.** Poll until the job succeeds, then `client.jobs.retrieveJobResult()` or the archive download endpoints.

Field-level request and response shapes live in the [API reference](/api-reference). 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`](/guides/sdks):

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

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

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

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

## Next

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