API Reference

SightRadar Face Recognition API

An AWS-Rekognition-compatible REST API for face indexing and search, where you only pay for what you use — billed per photo. New here? Start with the quickstart — provision a key, index a face, run a search, and check your wallet in four calls.

Endpoint reference

All 19 endpoints of the SightRadar Face Recognition API, version 1.0.0. Base URL https://api.sightradar.com. Authenticate with Authorization: Bearer frs_<prefix>_<secret> — see the quickstart to get a key. The interactive playground for these same endpoints is below.

Collections

Create and manage face collections (the registry of your indexed photos).

GET/v1/collections

List collections

Lists your collections, newest paging via limit/offset. Free.

GET https://api.sightradar.com/v1/collections

Parameters

FieldTypeDescription
limitin queryinteger
offsetin queryinteger

Response body

FieldTypeDescription
collectionsobject[]

Status codes

  • 200 Your collections.
  • 401 Missing or invalid API key.
POST/v1/collections

Create a collection

Creates a new face collection owned by your account. Free (0 credits).

POST https://api.sightradar.com/v1/collections

Request body (application/json)

FieldTypeDescription
collection_idrequiredstringYour chosen identifier for the collection.

Response body

FieldTypeDescription
collection_idstring
status"active" | "deleting" | "deleted"
photo_countinteger
face_countinteger
selfie_countinteger
created_atstring

Status codes

  • 200 Collection created.
  • 400 collection_id missing.
  • 401 Missing or invalid API key.
  • 409 Collection already exists in a non-active state.
GET/v1/collections/{id}

Describe a collection

Returns the collection with LIVE face/selfie counts merged from the engine. Free.

GET https://api.sightradar.com/v1/collections/{id}

Parameters

FieldTypeDescription
idrequiredin pathstringCollection id.

Response body

FieldTypeDescription
collection_idstring
status"active" | "deleting" | "deleted"
photo_countinteger
face_countinteger
selfie_countinteger
created_atstring

Status codes

  • 200 Collection detail.
  • 401 Missing or invalid API key.
  • 404 Resource not found.
DELETE/v1/collections/{id}

Delete a collection (cascade)

Schedules a durable cascade delete — all faces and selfies are removed asynchronously. Returns 202 with a workflow id. Free.

DELETE https://api.sightradar.com/v1/collections/{id}

Parameters

FieldTypeDescription
idrequiredin pathstringCollection id.

Response body

FieldTypeDescription
statusstring
workflow_idstring
messagestring

Status codes

  • 202 Deletion scheduled.
  • 401 Missing or invalid API key.
  • 404 Resource not found.
GET/v1/collections/{id}/metrics

Collection metrics

Live face/selfie counts straight from the engine's vector store. Free.

GET https://api.sightradar.com/v1/collections/{id}/metrics

Parameters

FieldTypeDescription
idrequiredin pathstring

Response body

FieldTypeDescription
collection_idstring
statusstring
photo_countinteger
face_countinteger
selfie_countinteger

Status codes

  • 200 Counts.
  • 401 Missing or invalid API key.
  • 404 Resource not found.
  • 502 Engine metrics unavailable.

Faces

Index, search, detect, and compare faces (billable operations).

POST/v1/collections/{id}/index

Index faces from a photo

Detects all quality-gated faces in an image and stores them in the collection (Rekognition `IndexFaces`). **Billable: 62 credits.**

Provide the image as JSON `{url}` / `{gcsKey}`, a multipart `file`, or raw image bytes. Optional `photoId` is the per-image key (defaults to a content hash).

POST https://api.sightradar.com/v1/collections/{id}/index

Parameters

FieldTypeDescription
idrequiredin pathstring
photoIdin querystringPer-image key (also accepted in body).
Idempotency-Keyin headerstringOpt-in idempotency. A replay under the same key returns 409 before any charge.

Request body (application/json)

FieldTypeDescription
urlstringPublic image URL.
gcsKeystringGoogle Cloud Storage object key.
photoIdstringOptional per-image key.

Also accepts: multipart/form-data, application/octet-stream

Response body

FieldTypeDescription
collection_idstring
photo_idstring
indexedintegerFaces stored.
detected_face_countinteger
rejected_face_countintegerDetected but quality-gated out.
facesobject[]
model_versionstring

Status codes

  • 200 Faces indexed.
  • 400 Cannot decode image, or no url/gcsKey/body provided.
  • 401 Missing or invalid API key.
  • 402 Wallet balance too low for this operation.
  • 409 A request with this Idempotency-Key is in flight or already processed.
  • 413 Image exceeds the 30 MB encoded size cap.
  • 429 Per-key RPS or per-customer concurrency limit exceeded.
  • 502 Engine error (the credit hold is refunded automatically).
POST/v1/collections/{id}/search

Search a collection

Search by a selfie image OR a precomputed 512-d embedding. Returns the matching photo ids ranked by similarity. **Billable: 62 credits.**

POST https://api.sightradar.com/v1/collections/{id}/search

Parameters

FieldTypeDescription
idrequiredin pathstring
Idempotency-Keyin headerstringOpt-in idempotency. A replay under the same key returns 409 before any charge.

Request body (application/json)

FieldTypeDescription
embeddingnumber[]
urlstring
gcsKeystring
thresholdnumberMin cosine similarity (0-1).
limitintegerMax matches.

Also accepts: multipart/form-data

Response body

FieldTypeDescription
collection_idstring
matchesobject[]
photo_idsstring[]
reasonstringPresent when no match: no_face | low_quality_selfie | point_not_found.
model_versionstring

Status codes

  • 200 Search result.
  • 400 Cannot decode image, or no url/gcsKey/body provided.
  • 401 Missing or invalid API key.
  • 402 Wallet balance too low for this operation.
  • 409 A request with this Idempotency-Key is in flight or already processed.
  • 429 Per-key RPS or per-customer concurrency limit exceeded.
  • 502 Engine error (the credit hold is refunded automatically).
POST/v1/collections/{id}/search-by-id

Search by a stored selfie point id

Search using a previously-registered selfie's `pointId` (Rekognition `SearchFaces` by FaceId). **Billable: 62 credits.**

POST https://api.sightradar.com/v1/collections/{id}/search-by-id

Parameters

FieldTypeDescription
idrequiredin pathstring
Idempotency-Keyin headerstringOpt-in idempotency. A replay under the same key returns 409 before any charge.

Request body (application/json)

FieldTypeDescription
pointIdrequiredstringA point_id returned by /selfies.
thresholdnumberMin cosine similarity (0-1).
limitintegerMax matches to return.

Response body

FieldTypeDescription
collection_idstring
matchesobject[]
photo_idsstring[]
reasonstringPresent when no match: no_face | low_quality_selfie | point_not_found.
model_versionstring

Status codes

  • 200 Search result.
  • 400 pointId missing.
  • 401 Missing or invalid API key.
  • 402 Wallet balance too low for this operation.
  • 429 Per-key RPS or per-customer concurrency limit exceeded.
  • 502 Engine error (the credit hold is refunded automatically).
POST/v1/detect

Detect faces (no storage)

Detect + quality-gate faces in an image WITHOUT storing anything (Rekognition `DetectFaces`). **Billable: 62 credits.**

POST https://api.sightradar.com/v1/detect

Parameters

FieldTypeDescription
Idempotency-Keyin headerstringOpt-in idempotency. A replay under the same key returns 409 before any charge.

Request body (application/json)

FieldTypeDescription
urlstringPublic image URL.
gcsKeystringGoogle Cloud Storage object key.
photoIdstringOptional per-image key.

Also accepts: multipart/form-data, application/octet-stream

Response body

FieldTypeDescription
detected_face_countinteger
gated_face_countinteger
facesobject[]

Status codes

  • 200 Detection result.
  • 400 Cannot decode image, or no url/gcsKey/body provided.
  • 401 Missing or invalid API key.
  • 402 Wallet balance too low for this operation.
  • 429 Per-key RPS or per-customer concurrency limit exceeded.
  • 502 Engine error (the credit hold is refunded automatically).
POST/v1/compare

Compare two faces

Compare the best face in two images (Rekognition `CompareFaces`). Returns cosine similarity (0-1) and a match boolean at the configured threshold. **Billable: 62 credits.**

POST https://api.sightradar.com/v1/compare

Parameters

FieldTypeDescription
Idempotency-Keyin headerstringOpt-in idempotency. A replay under the same key returns 409 before any charge.

Request body (application/json)

FieldTypeDescription
sourceUrlstring
sourceGcsKeystring
targetUrlstring
targetGcsKeystring
source_embeddingnumber[]
target_embeddingnumber[]

Response body

FieldTypeDescription
face_foundboolean
similaritynumber,nullCosine similarity (0-1).
matchboolean
thresholdnumber

Status codes

  • 200 Comparison result.
  • 400 Bad body or missing source/target.
  • 401 Missing or invalid API key.
  • 402 Wallet balance too low for this operation.
  • 429 Per-key RPS or per-customer concurrency limit exceeded.
  • 502 Engine error (the credit hold is refunded automatically).

Selfies

Register a single-face selfie for later search-by-id.

POST/v1/collections/{id}/selfies

Register a selfie

Register a single-face selfie (Rekognition `IndexFaces` MaxFaces=1). Returns a `point_id` you can later pass to `search-by-id`. **Billable: 62 credits.**

POST https://api.sightradar.com/v1/collections/{id}/selfies

Parameters

FieldTypeDescription
idrequiredin pathstring
userIdin querystringRequired (also accepted in body).
selfieIdin querystringOptional; defaults to a content hash.
Idempotency-Keyin headerstringOpt-in idempotency. A replay under the same key returns 409 before any charge.

Request body (application/json)

FieldTypeDescription
urlstringPublic image URL.
gcsKeystringGoogle Cloud Storage object key.
photoIdstringOptional per-image key.
userIdrequiredstring
selfieIdstring

Also accepts: multipart/form-data

Response body

FieldTypeDescription
face_foundboolean
reasonstringno_face when face_found=false.
collection_idstring
user_idstring
selfie_idstring
point_idstringPass to search-by-id.
embeddingnumber[]512-d L2-normalized vector.
det_scorenumber
quality_passedboolean
model_versionstring

Status codes

  • 200 Selfie processed (check face_found).
  • 400 userId missing or bad image.
  • 401 Missing or invalid API key.
  • 402 Wallet balance too low for this operation.
  • 429 Per-key RPS or per-customer concurrency limit exceeded.
  • 502 Engine error (the credit hold is refunded automatically).

Batch

Asynchronous bulk processing with webhook callbacks.

POST/v1/batches

Submit a batch job

Fire-and-forget bulk processing of up to 1000 **URL-only** photos. base64 is rejected in batch — use real-time endpoints for inline images. Results arrive per-photo via your registered webhook, or poll `GET /v1/batches/{id}`.

POST https://api.sightradar.com/v1/batches

Request body (application/json)

FieldTypeDescription
collection_idrequiredstring
oprequired"index" | "match"
webhook_endpoint_idstringOptional; an endpoint id from POST /v1/webhooks.
photosrequiredobject[]

Response body

FieldTypeDescription
batch_idstring
total_photosinteger
statusstring
messagestring

Status codes

  • 202 Batch accepted.
  • 400 Validation error (missing fields, base64 in batch, too large).
  • 401 Missing or invalid API key.
GET/v1/batches/{id}

Get batch status

Poll a batch's progress (webhook-down fallback). Free.

GET https://api.sightradar.com/v1/batches/{id}

Parameters

FieldTypeDescription
idrequiredin pathstring

Response body

FieldTypeDescription
batch_idstring
collection_idstring
opstring
statusstring
total_photosinteger
succeededinteger
failedinteger
pendinginteger
claimedinteger
created_atstring

Status codes

  • 200 Batch status.
  • 401 Missing or invalid API key.
  • 404 Resource not found.

Webhooks

Register endpoints that receive per-photo batch results.

GET/v1/webhooks

List webhook endpoints

GET https://api.sightradar.com/v1/webhooks

Response body

FieldTypeDescription
webhooksobject[]

Status codes

  • 200 Your webhook endpoints.
  • 401 Missing or invalid API key.
POST/v1/webhooks

Register a webhook endpoint

Register an HTTPS URL to receive per-photo batch results. We sign each delivery with HMAC-SHA256 over `timestamp.body`. If you omit `secret`, one is generated and returned **once**.

POST https://api.sightradar.com/v1/webhooks

Request body (application/json)

FieldTypeDescription
urlrequiredstringPublic HTTPS URL.
secretstringOptional signing secret; generated if omitted.

Response body

FieldTypeDescription
webhook_endpoint_idstring
urlstring
statusstring
secretstringReturned ONCE only when generated.
notestring

Status codes

  • 200 Endpoint registered.
  • 400 Invalid or non-HTTPS/private URL.
  • 401 Missing or invalid API key.
  • 503 Webhook encryption key not configured.

Wallet & Usage

Check your credit balance, usage, and auto-recharge config.

GET/v1/wallet

Get credit balance

Returns your current credit balance. Free.

GET https://api.sightradar.com/v1/wallet

Response body

FieldTypeDescription
balance_creditsinteger

Status codes

  • 200 Balance.
  • 401 Missing or invalid API key.
GET/v1/usage

Usage report

Per-operation usage aggregation over the last N days (default 30, max 365). Free.

GET https://api.sightradar.com/v1/usage

Parameters

FieldTypeDescription
daysin queryinteger

Response body

FieldTypeDescription
daysinteger
by_opobject[]
total_callsinteger
total_creditsinteger

Status codes

  • 200 Usage breakdown.
  • 401 Missing or invalid API key.

Health

Liveness and readiness probes (unauthenticated).

GET/healthzno auth

Liveness probe

Process is up and serving. No dependencies. Unauthenticated.

GET https://api.sightradar.com/healthz

Response body

FieldTypeDescription
statusstring

Status codes

  • 200 Service is alive.
GET/readyzno auth

Readiness probe

Verifies the Postgres connection. 200 = ready, 503 = not ready. Unauthenticated.

GET https://api.sightradar.com/readyz

Response body

FieldTypeDescription
statusstring
postgresstring

Status codes

  • 200 Ready to serve traffic.
  • 503 Not ready (Postgres down or unconfigured).

Interactive playground

Try any endpoint against the live API with your own key.