Loading...
Loading...
Integrate Didit Face Search standalone API to perform 1:N facial search against all previously verified sessions. Use when the user wants to detect duplicate accounts, search for matching faces, check if a face already exists in the system, prevent duplicate registrations, search against blocklist, or implement facial deduplication using Didit. Returns ranked matches with similarity percentages.
npx skill4agent add didit-protocol/skills didit-face-search| Range | Interpretation |
|---|---|
| 90%+ | Strong likelihood of same person |
| 70-89% | Possible match, may need manual review |
| Below 70% | Likely different individuals |
x-api-keyPOST https://apx.didit.me/auth/v2/programmatic/register/{"email": "you@gmail.com", "password": "MyStr0ng!Pass"}POST https://apx.didit.me/auth/v2/programmatic/verify-email/{"email": "you@gmail.com", "code": "A3K9F2"}api_keyGET /v3/billing/balance/POST /v3/billing/top-up/{"amount_in_dollars": 50}POST https://verification.didit.me/v3/face-search/| Header | Value | Required |
|---|---|---|
| Your API key | Yes |
| | Yes |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| file | Yes | — | Face image to search (JPEG/PNG/WebP/TIFF, max 5MB) |
| boolean | No | | Try 0/90/180/270 rotations for non-upright faces |
| boolean | No | | Save in Business Console |
| string | No | — | Your identifier for session tracking |
import requests
response = requests.post(
"https://verification.didit.me/v3/face-search/",
headers={"x-api-key": "YOUR_API_KEY"},
files={"user_image": ("photo.jpg", open("photo.jpg", "rb"), "image/jpeg")},
)
print(response.json())const formData = new FormData();
formData.append("user_image", photoFile);
const response = await fetch("https://verification.didit.me/v3/face-search/", {
method: "POST",
headers: { "x-api-key": "YOUR_API_KEY" },
body: formData,
});{
"request_id": "a1b2c3d4-...",
"face_search": {
"status": "Approved",
"total_matches": 1,
"matches": [
{
"session_id": "uuid-...",
"session_number": 1234,
"similarity_percentage": 95.2,
"vendor_data": "user-456",
"verification_date": "2025-06-10T10:30:00Z",
"user_details": {
"name": "Elena Martinez",
"document_type": "Identity Card",
"document_number": "***456"
},
"match_image_url": "https://example.com/match.jpg",
"status": "Approved",
"is_blocklisted": false
}
],
"user_image": {
"entities": [
{"age": "27.6", "bbox": [40, 40, 120, 120], "confidence": 0.95, "gender": "female"}
],
"best_angle": 0
},
"warnings": []
}
}| Status | Meaning | Action |
|---|---|---|
| No concerning matches found | Proceed — new unique user |
| Matches above similarity threshold | Review |
| Blocklist match or policy violation | Check |
| Code | Meaning | Action |
|---|---|---|
| Invalid request | Check file format, size, parameters |
| Invalid API key | Verify |
| Insufficient credits | Top up at business.didit.me |
| Field | Type | Description |
|---|---|---|
| string | UUID of the matching session |
| integer | Session number |
| float | 0-100 similarity score |
| string | Your reference from the matching session |
| string | ISO 8601 timestamp |
| string | Name from the matching session |
| string | Document type used |
| string | Partially masked document number |
| string | Temporary URL (expires 60 min) |
| string | Status of the matching session |
| boolean | Whether the match is from the blocklist |
| Field | Type | Description |
|---|---|---|
| string | Estimated age |
| array | Face bounding box |
| float | Detection confidence (0-1) |
| string | |
| integer | Rotation applied (0, 90, 180, 270) |
| Tag | Description |
|---|---|
| No face found in image |
| Face matches a blocklisted entry |
| Tag | Description |
|---|---|
| Multiple faces detected — unclear which to use |
Similarity threshold and allow multiple faces settings are configurable in Console.
errorwarninginformation1. During new user registration
2. POST /v3/face-search/ → {"user_image": selfie}
3. If total_matches == 0 → new unique user
If matches found → check similarity_percentage:
90%+ → likely duplicate, investigate matches[].vendor_data
70-89% → possible match, flag for manual review1. POST /v3/passive-liveness/ → verify user is real
2. POST /v3/face-search/ → check for existing accounts
3. POST /v3/id-verification/ → verify identity document
4. POST /v3/face-match/ → compare selfie to document photo
5. All Approved → verified, unique, real userSecurity: Match image URLs expire after 60 minutes. Store onlyandsession_id— minimize biometric data on your servers.similarity_percentage
# Requires: pip install requests
export DIDIT_API_KEY="your_api_key"
python scripts/search_faces.py selfie.jpg
python scripts/search_faces.py photo.png --rotate --vendor-data user-123