Spectatr.ai

Getting Started

Authentication

One header on every request. There is no login call and no request signing; a short-lived read token is available for reading your clips.


The header

Headers
X-Api-Key: pk_live_example_0000000000000000
Content-Type: application/json

Send your API key directly on each call and you are authenticated.

Complete example

curl
curl -X POST https://api.spectatr.ai/partner/v1/matches/g-88213/ingest \
  -H "X-Api-Key: pk_live_example_0000000000000000" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "SRT_CALLER",
    "url": "srt://feed.provider.example:9001",
    "ingestStartTime": 1757008800000,
    "latencyMs": 200
  }'

Read token

To read your clips and their full details through our item APIs, exchange your API key for a token. The token is read-only and lasts one hour; to refresh it, call the route again.

POST/token
curl
curl -X POST https://api.spectatr.ai/partner/v1/token \
  -H "X-Api-Key: pk_live_example_0000000000000000"
Response
{ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example", "expiresIn": 3600 }
StatusMeaning
200Token issued. Send it as Authorization: {accessToken} on item API calls.
401Missing or unknown API key.
403 item_access_not_enabledRead access is not set up for your account yet. Ask us to enable it.

Rotation and revocation

Two keys can be active at once. To rotate, we issue a new key while the existing one keeps working; you cut over at your own pace, then tell us to revoke the old one, with no downtime and no coordinated deploy. Tell us straight away if a key is exposed and we will revoke it and issue a replacement.