Quickstart
From zero to your first face match in four calls. Create an API key, index a face, search the collection with a selfie, and check your credit balance.
Every call below is a real request against the production API at https://api.sightradar.com. New accounts start with trial credits, so you can run the whole guide for free.
Get an API key
Sign in to the console and open API Keys → Create key. The key starts with frs_ and is shown once. Export it so the snippets below pick it up:
export SR_API_KEY="frs_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export SR_BASE="https://api.sightradar.com"Every request authenticates with Authorization: Bearer $SR_API_KEY. See Authentication for key rotation and limits.
Create a collection
A collection is the namespace your faces live in, for example one per event. This call is free.
curl -X POST "$SR_BASE/v1/collections" \
-H "Authorization: Bearer $SR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"collection_id": "quickstart-demo"}'{
"collection_id": "quickstart-demo",
"status": "active",
"photo_count": 0,
"face_count": 0,
"selfie_count": 0,
"created_at": "2026-06-22T19:40:00Z"
}Index a face
Send a photo by URL (or a multipart file, or raw bytes). SightRadar detects every quality-gated face and stores its faceprint. Pass a photoId so you can find the photo later. Billable: 93 credits.
curl -X POST "$SR_BASE/v1/collections/quickstart-demo/index" \
-H "Authorization: Bearer $SR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/group-photo.jpg", "photoId": "photo-001"}'{
"collection_id": "quickstart-demo",
"photo_id": "photo-001",
"indexed": 3,
"detected_face_count": 3,
"rejected_face_count": 0,
"faces": [
{ "face_index": 0, "point_id": "…", "det_score": 0.84, "min_px": 120, "bbox": { "x": 24, "y": 22, "w": 53, "h": 53 } }
],
"model_version": "sr-recog-1"
}A photo with zero usable faces is still a successful, charged result. Billing is per photo processed, never per face. See Billing.
Search with a selfie
Search the collection with a different photo of the same person. You get the matching photo_ids back, ranked by similarity. Billable: 93 credits.
curl -X POST "$SR_BASE/v1/collections/quickstart-demo/search" \
-H "Authorization: Bearer $SR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/selfie.jpg", "limit": 10}'{
"collection_id": "quickstart-demo",
"matches": [{ "photo_id": "photo-001", "score": 0.91 }],
"photo_ids": ["photo-001"],
"model_version": "sr-recog-1"
}No face in the selfie? You get "reason": "no_face" with an empty match list. That is a successful, charged call, because the model processed the image. Only engine failures (502) are refunded. See Billing.
Check your wallet
Billable calls also return an X-Credits-Remaining header, so you can track spend inline.
curl "$SR_BASE/v1/wallet" -H "Authorization: Bearer $SR_API_KEY"{ "balance_credits": 4999814 }What next
Bulk imports
Index up to 1,000 photos per call with per-photo results delivered to your webhook.
Selfie registration
Register a selfie once and reuse it across searches with search-by-id, at the cheaper tier.
Choosing a threshold
Turn a 0 to 1 similarity score into accept, review, and reject bands.
Auto-recharge
Never run out mid-batch: set a threshold and top-up amount in Billing.
SightRadar documentation
A face recognition API you can integrate in an afternoon. Index faces, search a collection with a selfie, compare two faces, or detect faces without storing anything. Billed per photo, on prepaid credits.
Authentication
API keys, the Authorization header, rotation, and the limits that apply per key and per account.