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"}'Note
Keep keys secret. Never expose API keys in client-side code or public repositories. Use environment variables or a secrets manager.
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
| Rule | Detail |
|---|---|
| Header name | x-api-key |
| Required on | All /v1/* endpoints |
| Job tasks limit | 1–100 task IDs per POST /v1/jobs |
| Prompts | At least one non-empty string in the prompts array |
| Pagination | limit up to 100; cursor via nextToken |