SightRadar — Face Recognition API for Python
A high-accuracy face recognition API and a drop-in AWS Rekognition alternative.
Official Python client for the SightRadar facial recognition API — face detection, 1:1 verification, and 1:N face search with zero runtime dependencies.
What is SightRadar?
SightRadar is a fast, accurate, and affordable face recognition API for developers. This is the official Python SDK — a thin, fully-typed wrapper over the SightRadar facial recognition API that lets you add face detection, face matching, 1:1 face verification, and 1:N face search to any application in minutes.
If you are looking for an AWS Rekognition alternative with high-accuracy face recognition, simpler pricing, and a cleaner API, SightRadar is built for you. The SDK has zero runtime dependencies (built entirely on the Python standard library), supports Python 3.8+, and ships typed responses for every endpoint.
- 🎯 High-accuracy facial recognition — state-of-the-art embeddings with quality gating for reliable matches
- ⚡ Fast face search — index millions of faces and search a collection with a single selfie
- 🔁 Drop-in AWS Rekognition alternative — familiar
index/search/detect/compareoperations - 💸 Transparent, usage-based pricing — pay per call, no minimums (see pricing)
- 🪶 Zero dependencies — pure standard-library client, easy to audit and vendor
Get a free API key at sightradar.com and start building.
SightRadar vs. AWS Rekognition
Already wrote code against AWS Rekognition? SightRadar mirrors the operations you know — IndexFaces, SearchFacesByImage, DetectFaces, CompareFaces — so migrating is mostly a find-and-replace, not a rewrite. See the migration guide.
| SightRadar | AWS Rekognition | |
|---|---|---|
| Face detection API | ✅ | ✅ |
| 1:1 face verification (compare) | ✅ | ✅ |
| 1:N face search (collections) | ✅ | ✅ |
| Selfie / liveness-style registration | ✅ | ⚠️ limited |
| Zero-dependency SDK | ✅ | ❌ (boto3) |
| Transparent per-call pricing | ✅ | ⚠️ complex tiers |
| Free API key to start | ✅ | ⚠️ AWS account required |
Install
pip install sightradar
Authenticate
Create an API key in the console, then pass it
directly or via the SIGHTRADAR_API_KEY environment variable.
from sightradar import SightRadar
sr = SightRadar(api_key="frs_...") # or: SightRadar() with SIGHTRADAR_API_KEY set
Core workflow — index and search faces
# 1. Create a collection to hold faces.
sr.create_collection("event-2026")
# 2. Index faces from photos (URL, GCS key, or a local file).
sr.index("event-2026", url="https://example.com/group.jpg")
sr.index("event-2026", file="/path/to/photo.jpg", photo_id="img-42")
# 3. Search the collection with one selfie.
result = sr.search("event-2026", url="https://example.com/selfie.jpg")
if result.found:
for m in result.matches:
print(m.photo_id, round(m.score, 3))
else:
print("no match:", result.reason)
Stateless operations (nothing stored)
# Detect + quality-gate faces in an image.
det = sr.detect(url="https://example.com/photo.jpg")
print(det.detected_face_count, det.gated_face_count)
# 1:1 face verification between two faces.
cmp = sr.compare(
source_url="https://example.com/a.jpg",
target_url="https://example.com/b.jpg",
)
print(cmp.match, cmp.similarity)
Selfies and search by id
Register one selfie per person, then search with the returned point_id
instead of re-uploading an image (cheaper: the search-by-id tier).
reg = sr.register_selfie("event-2026", "user-42", url="https://example.com/selfie.jpg")
hits = sr.search_by_id("event-2026", reg.point_id, limit=20)
Deleting (soft by default, restorable)
# Soft delete: stops serving now, erased after the grace window. Undo with restore.
receipt = sr.delete_collection("event-2026") # receipt.restorable is True
sr.restore_collection("event-2026")
# Immediate / compliance (GDPR / BIPA) erasure — NOT restorable.
sr.delete_collection("event-2026", compliance=True)
status = sr.deletion_status("event-2026") # status.erased -> phase completed + verified_zero
# One photo's faces only.
sr.delete_photo("event-2026", "img-42")
sr.restore_photo("event-2026", "img-42")
Batches and webhooks
wh = sr.register_webhook("https://your.app/sightradar")
# wh.secret is returned ONCE — store it.
batch = sr.submit_batch(
"event-2026", "index", # or "match"
[{"url": "https://example.com/1.jpg", "external_id": "img-1"}],
webhook_endpoint_id=wh.webhook_endpoint_id,
)
status = sr.get_batch(batch.batch_id) # .succeeded / .failed / .pending / .done
page = sr.get_batch_photos(batch.batch_id) # per-photo results, paginated
# In your webhook handler (raw body, not parsed JSON):
from sightradar import verify_webhook_signature
ok = verify_webhook_signature(
stored_secret,
request.headers["X-SightRadar-Timestamp"],
request.get_data(), # raw bytes
request.headers["X-SightRadar-Signature"],
)
Retries and idempotency
Retries are off by default. Pass max_retries to retry 429/502/503 with
backoff. Only GETs and calls that carry an idempotency_key are retried, so
a retry can never double-charge you.
sr = SightRadar(api_key="frs_...", max_retries=3)
sr.index("event-2026", url="https://example.com/a.jpg", idempotency_key="photo-a-v1")
Account
print(sr.wallet().balance_credits)
print(sr.usage(days=30))
Errors
Every non-2xx response raises a typed exception:
from sightradar import (
SightRadarError, # base
AuthenticationError, # 401
InsufficientCreditsError, # 402
NotFoundError, # 404
RateLimitError, # 429
)
try:
sr.describe_collection("missing")
except NotFoundError as e:
print(e.status_code, e.message)
Image inputs
Index / search / detect / register_selfie accept exactly one image source (register_selfie also needs user_id):
url=— a public image URLgcs_key=— a Google Cloud Storage object keyfile=— a local path,bytes, or a file-like object (uploaded as multipart)
search additionally accepts embedding= (a 512-d vector).
Resources
- 🌐 Website: sightradar.com
- 📚 API documentation: sightradar.com/docs
- 🔑 Get an API key: sightradar.com/login
- 💸 Pricing: sightradar.com/pricing
- 🔄 Migrate from AWS Rekognition: sightradar.com/migrate
- 📦 Node.js / TypeScript SDK: npmjs.com/package/sightradar
License
MIT © SightRadar
SightRadar — high-accuracy face recognition API and AWS Rekognition alternative. Face detection, facial recognition, 1:1 verification, and 1:N face search for developers.
Metadata
Release files for sightradar 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sightradar-1.1.2.tar.gz | 18.9 kB | Without provenance | Details for sightradar-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sightradar-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for sightradar-1.1.2-py3-none-any.whl |
Total release size: 35.6 kB
Release files / sightradar-1.1.2.tar.gz
| Download URL | sightradar-1.1.2.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42e46d4de26e7d8f4f0a3490b6d087e668ccb08bf7937b33a8d3145251867a9c
|
|
BLAKE2b-256 checksum How to use checksums |
486f967eac4b98c7f29b93f5af6710007e55999c748d53e52a7a2bebd5620cb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / sightradar-1.1.2-py3-none-any.whl
| Download URL | sightradar-1.1.2-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1c2d68828e6375ca37b8147e71768183fd24299ede68941e76883feb0017884
|
|
BLAKE2b-256 checksum How to use checksums |
5a12df417e44c91a7ed8637946823a74021d0d4204365e9c2badbd6b8f73af7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for sightradar 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.