SightRadardocs
API referenceSelfies

Register a selfie

Register a single-face selfie (Rekognition IndexFaces MaxFaces=1). (POST /v1/collections/{id}/selfies)

POST/v1/collections/{id}/selfies
Auth
Bearer API key
Billing
93 credits (real-time tier).

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

Example request

curl -X POST "https://api.sightradar.com/v1/collections/$ID/selfies" \
  -H "Authorization: Bearer $SR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"userId":"<userId>"}'

Parameters

NameInTypeDescription
id requiredpathstring
userIdquerystringRequired (also accepted in body).
selfieIdquerystringOptional; defaults to a content hash.
Idempotency-KeyheaderstringOpt-in idempotency. A replay under the same key is never re-charged. For a selfie register it returns 200 with the stored result (Idempotent-Replay: true) when the registration identity matches; every other op returns 409.

Request body (application/json)

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

Also accepts: multipart/form-data.

Status codes

StatusMeaning
200Selfie processed (check face_found). On a settled idempotent replay of the SAME registration (same collection + userId + selfieId), the body is the reduced SelfieReplayResult and the Idempotent-Replay header is true.
400userId missing or bad image.
401Missing or invalid API key.
402Wallet balance too low for this operation.
429Per-key RPS or per-customer concurrency limit exceeded.
502Engine error (the credit hold is refunded automatically).
Last updated

On this page