Authentication

Every customer request needs Authorization: Bearer. Use an unrestricted secret (sk_live_...) from the dashboard, or a Cognito access token. Do not put a secret key in browser code. A live key can run jobs, read usage, manage keys, and start Stripe checkout or portal sessions.

$curl -X POST https://api.segmentationapi.com/v1/uploads/presign \
> -H "Content-Type: application/json" \
> -H "Authorization: Bearer YOUR_SEGMENTATION_API_KEY" \
> -d '{"contentType": "image/png"}'
1import { SegmentationAPIClient } from "@segmentationapi/sdk";
2
3const client = new SegmentationAPIClient({
4 token: process.env.SEGMENTATION_API_KEY!,
5});

A missing or revoked credential returns 401:

1{
2 "error": "Unauthorized",
3 "message": "Missing or invalid API key"
4}

Job requests accept 1–100 task IDs (exactly one for video). Pagination uses limit up to 100 and nextToken. See the API reference for the rest of the contract.