1:1 face matching, 1:N search, registration, and liveness detection
Face Biometrics
The face API provides biometric operations: 1:1 verification (does this face match this identity?), 1:N search (who is this person?), face registration into indexed databases, and liveness/quality analysis. All endpoints accept base64-encoded images.
Databases
9thSense ships with 6 pre-built face index databases:
| Database ID | Description |
|---|---|
politically_exposed_person | PEP watchlist |
sanction_watch | Sanctions and embargoes list |
public_figures | Public figures for identity disambiguation |
fraudsters | Known fraud actors |
celebrity | Celebrity recognition index |
custom | Tenant-specific registries populated via /face/register |
Additional custom databases can be provisioned on request.
Endpoints
1:1 Face Match
POST /api/v1/face/match
Compares two faces and returns a similarity score and match verdict.
Request body:
sourceobjectrequiredReference face image. { "data": "<base64>", "mime_type": "image/jpeg" }.
targetobjectrequiredFace to compare against. Same format as source.
thresholdnumberMinimum similarity score to consider a match (0–1). Default 0.75.
tenant_idstringResponse (200):
matchbooleansimilaritynumbersource_qualitynumbertarget_qualitynumberprocessing_msnumberExample response:
{
"match": true,
"similarity": 0.934,
"source_quality": 0.91,
"target_quality": 0.87,
"processing_ms": 145
}
1:N Face Search
POST /api/v1/face/search
Searches one or more databases for faces matching the probe image. Returns the top-N matches.
Request body:
probeobjectrequiredProbe face image. { "data": "<base64>", "mime_type": "image/jpeg" }.
databasesstring[]requiredList of database IDs to search (e.g. ["politically_exposed_person", "sanction_watch"]).
top_knumberNumber of top matches to return per database. Default 5.
thresholdnumberMinimum similarity score to include in results. Default 0.70.
tenant_idstringResponse (200):
resultsobject[]Array of match objects, sorted by similarity descending.
Match Object
databasestringface_idstringsimilaritynumbermetadataobjectsearched_databasesstring[]processing_msnumberExample response:
{
"results": [
{
"database": "politically_exposed_person",
"face_id": "pep_00123",
"similarity": 0.912,
"metadata": { "name": "John Doe", "country": "IN", "category": "domestic_politician" }
}
],
"searched_databases": ["politically_exposed_person", "sanction_watch"],
"processing_ms": 210
}
Register Face
POST /api/v1/face/register
Registers a face into one of the indexed databases. The face embedding is computed and stored for future 1:N searches.
Request body:
imageobjectrequiredFace image to register. { "data": "<base64>", "mime_type": "image/jpeg" }.
databasestringrequiredTarget database ID (e.g. "employee").
face_idstringOptional external ID. Auto-generated UUID if not provided.
metadataobjectArbitrary metadata to store with this registration (name, employee ID, tags, etc.).
tenant_idstringResponse (200):
face_idstringdatabasestringqualitynumberregistered_atstringExtract / Liveness Analysis
POST /api/v1/face/extract
Analyzes a face image for quality, liveness, and biometric attributes. Does not perform matching or registration.
Request body:
imageobjectrequiredFace image. { "data": "<base64>", "mime_type": "image/jpeg" }.
checksstring[]Specific checks to run. Default: all. Options: "liveness", "quality", "attributes", "spoof".
tenant_idstringResponse (200):
face_detectedbooleanface_countnumberqualitynumberlivenessobjectLiveness check result.
Liveness
is_livebooleanscorenumberspoof_typestring"print", "screen", "mask", or null.attributesobjectprocessing_msnumberBulk Search (Async)
POST /api/v1/face/bulk/search
Asynchronous bulk 1:N search for large volumes of probe images. Enqueues a batch job and returns a job ID to poll.
Request body:
probesobject[]requiredArray of probe images. Each: { "data": "<base64>", "mime_type": "image/jpeg", "id": "<your-ref-id>" }.
databasesstring[]requiredDatabases to search.
thresholdnumberMinimum similarity threshold. Default 0.70.
webhook_urlstringURL to POST results to when the batch completes.
tenant_idstringResponse (202):
job_idstringstatusstring"queued"probe_countnumberList Face Indices
GET /api/v1/face/index/details
Returns details about all accessible face index databases.
Query parameters:
tenant_idstringResponse (200): Array of index detail objects.
databasestringdisplay_namestringface_countnumberlast_updatedstringRecent Registrations
GET /api/v1/face/recent/registered
Returns recently registered faces across all databases.
Query parameters:
databasestringFilter to a specific database.
limitnumberNumber of records to return. Default 20.
tenant_idstringResponse (200): Array of registration summary objects.
face_idstringdatabasestringmetadataobjectqualitynumberregistered_atstring