Verification (1:1)
1:1 Verification answers the question: "Are these two faces the same person?" It compares two face images (or one image against an enrolled face ID) and returns a similarity score between 0 and 1.
Use verification when you need to confirm that the person presenting themselves matches a known identity, for example re-authentication, document-to-selfie matching, or access control.
Compare two images
The simplest form: submit two face images and get back a similarity score. No collection or enrollment required.
curl -X POST https://your-domain.com/api/v1/compare \
-H "X-API-Key: YOUR_API_KEY" \
-F "image_a=@reference.jpg" \
-F "image_b=@probe.jpg"{
"success": true,
"data": {
"similarity": 0.91,
"verified": true,
"threshold": 0.55,
"query_time_ms": 38
}
}/compareThe known face (identity to match against)
The face to verify against the reference
Verify against an enrolled face
Compare a probe image against a specific enrolled face ID in a collection. More efficient than comparing two raw images since the enrolled face reference is already stored.
curl -X POST https://your-domain.com/api/v1/collections/COLLECTION_ID/verify \
-H "X-API-Key: YOUR_API_KEY" \
-F "image=@probe.jpg" \
-F "face_id=face_01j9abc..."{
"success": true,
"data": {
"face_id": "face_01j9abc...",
"external_id": "user_alice_001",
"similarity": 0.93,
"verified": true,
"threshold": 0.55,
"metadata": {"name": "Alice Smith"},
"query_time_ms": 22
}
}Verify by external ID
If you prefer to reference faces by your own IDs rather than internal face IDs, use the external_id parameter. When multiple embeddings exist for the same external_id (auto-enrolled secondary embeddings), the highest similarity across all of them is returned.
POST /api/v1/collections/{collection_id}/verify
X-API-Key: fr_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: multipart/form-data
image=@probe.jpg
external_id=user_alice_001Response fields
| Field | Type | Description |
|---|---|---|
| similarity | float | Cosine similarity score, 0.0–1.0. |
| verified | boolean | true if similarity ≥ threshold. |
| threshold | float | The threshold used for this request (default 0.55). |
| query_time_ms | integer | Time taken for embedding + comparison (ms). |
Choosing a threshold
The default threshold of 0.55 works well for most verification use-cases. You can override it per-request with the threshold parameter:
- High security (0.65–0.75): Fewer false positives. Use for access control, financial verification.
- Balanced (0.55, default): Good for most identity verification use-cases.
- Permissive (0.40–0.50): More false positives. Suitable for photo deduplication or fuzzy matching.
# Override threshold per request
image=@probe.jpg
face_id=face_01j9abc...
threshold=0.70Try it live: verify by external ID
Enter your API key, collection ID, and the external ID of an enrolled face, then upload a probe image.
/collections/{collection_id}/verifyThe face to verify
Your identifier for the enrolled face
Minimum similarity score