Skip to navigation

Authentication

Every customer request needs Authorization: Bearer. Use an unrestricted secret (sk_live_...) from the dashboard, or a Cognito access token. The segment CLI manages both (auth login, keys set). 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"}'
import { SegmentationAPIClient } from "@segmentationapi/sdk";
const client = new SegmentationAPIClient({
token: process.env.SEGMENTATION_API_KEY!,
});

A missing or revoked credential returns 401:

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

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.