Authentication

All SegmentationAPI requests are authenticated using API keys passed in the request header. Keys are scoped to your account and can be managed from the dashboard.

API Key Header

Include the x-api-key header on every request to /v1/uploads/presign and /v1/jobs endpoints.

Example request

curl -X POST https://api.segmentationapi.com/v1/uploads/presign \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_SEGMENTATION_API_KEY" \
  -d '{"contentType": "image/png"}'

Error Responses

If the API key is missing, malformed, or revoked, the API returns a 401 Unauthorized response:

401 Unauthorized

{
  "error": "Unauthorized",
  "message": "Missing or invalid API key"
}

Request Rules

RuleDetail
Header namex-api-key
Required onAll /v1/* endpoints
Job tasks limit1–100 task IDs per POST /v1/jobs
PromptsAt least one non-empty string in the prompts array
Paginationlimit up to 100; cursor via nextToken