Matching
Matching answers "are these two samples the same person?", without enrolling anyone.
Compare two face samples
/matching/face Access tokenCompares two face samples — two images, or an image and a video — and returns whether they belong to the same person. No enrolment is needed: a common use is matching a selfie with the portrait of an identity document. With livenessMethod, liveness is also checked on the probe sample.
Roles: API · SDK
Headers
applicationIdstring· uuidRequiredYour application ID.
transactionIdstringOptionalYour own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.
Request bodymultipart/form-data
livenessMethodnumberOptionalLiveness method for presentation attack detection:
1passive video (the user holds still for a moment),2passive image. Omit it to send a single image without liveness.sourcefileRequiredReference face image, for example the portrait of an identity document.
probefileRequiredFace to compare: an image, or a video when
livenessMethodis1.
Response200 · application/json
matchedbooleanRequiredtrueif both samples belong to the same person.scoreobjectRequireddetectedFaceobjectRequiredoperationIdstringRequiredIdentifier of the matching operation.
Status codes
- 200Comparison finished. Read
matched. - 400Invalid request, or the samples are suspiciously identical.
ATTACK_SUSPECTED. - 401Invalid or expired auth token.
TOKEN_NOT_VALID. - 403The biometric method is not enabled for the application.
BIOMETRIC_METHOD_NOT_ENABLED. - 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/matching/face' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'livenessMethod=1' \
-F 'source=@document-portrait.jpg' \
-F 'probe=@selfie.mp4'
application/json{
"matched": true,
"score": {
"liveness": 0.96,
"matching": 0.91,
"identityVerification": 0.93
},
"detectedFace": {
"source": {
"detected": true,
"box": {
"x": 412,
"y": 236,
"w": 318,
"h": 402
},
"extractedSelfie": "CgRGQUNFEhQyMDI2LTExLTA0VDEwOjE1OjMwWhoE…"
},
"probe": {
"detected": true,
"box": {
"x": 412,
"y": 236,
"w": 318,
"h": 402
},
"extractedSelfie": "CgRGQUNFEhQyMDI2LTExLTA0VDEwOjE1OjMwWhoE…"
}
},
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}
Compare two face templates
/matching/face/template Access tokenCompares two face templates and returns whether they belong to the same person.
Roles: API · SDK
Headers
applicationIdstring· uuidRequiredYour application ID.
transactionIdstringOptionalYour own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.
Request bodymultipart/form-data
sourcestring· base64RequiredBiometric template, in base64.
probestring· base64RequiredTemplate to compare, in base64.
Response200 · application/json
matchedbooleanRequiredtrueif both templates belong to the same person.scoreobjectRequiredoperationIdstringRequiredIdentifier of the matching operation.
Status codes
- 200Comparison finished. Read
matched. - 400Invalid request, or the templates are suspiciously identical.
ATTACK_SUSPECTED. - 401Invalid or expired auth token.
TOKEN_NOT_VALID. - 403The biometric method is not enabled for the application.
BIOMETRIC_METHOD_NOT_ENABLED. - 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/matching/face/template' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'source=@document-portrait.jpg' \
-F 'probe=@selfie.mp4'
application/json{
"matched": true,
"score": {
"liveness": 0.96,
"matching": 0.91,
"identityVerification": 0.93
},
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}
Compare two voice samples
/matching/voice Access tokenCompares two voice recordings and returns whether they belong to the same person. No enrolment is needed. With livenessMethod, liveness is also checked on the probe sample.
Roles: API · SDK
Headers
applicationIdstring· uuidRequiredYour application ID.
transactionIdstringOptionalYour own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.
Request bodymultipart/form-data
livenessMethodnumberOptionalLiveness method for voice:
0(VOICE_PLA) detects replayed recordings and AI-generated voices. Omit it to skip liveness.sourcefileRequiredReference voice recording.
probefileRequiredVoice recording to compare.
Response200 · application/json
matchedbooleanRequiredtrueif both samples belong to the same person.scoreobjectRequiredoperationIdstringRequiredIdentifier of the matching operation.
Status codes
- 200Comparison finished. Read
matched. - 400Invalid request, or the samples are suspiciously identical.
ATTACK_SUSPECTED. - 401Invalid or expired auth token.
TOKEN_NOT_VALID. - 403The biometric method is not enabled for the application.
BIOMETRIC_METHOD_NOT_ENABLED. - 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/matching/voice' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'livenessMethod=0' \
-F 'source=@reference.wav' \
-F 'probe=@voice.wav'
application/json{
"matched": true,
"score": {
"liveness": 0.96,
"matching": 0.91,
"identityVerification": 0.93
},
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}
Compare two voice templates
/matching/voice/template Access tokenCompares two voice templates and returns whether they belong to the same person.
Roles: API · SDK
Headers
applicationIdstring· uuidRequiredYour application ID.
transactionIdstringOptionalYour own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.
Request bodymultipart/form-data
sourcestring· base64RequiredBiometric template, in base64.
probestring· base64RequiredTemplate to compare, in base64.
Response200 · application/json
matchedbooleanRequiredtrueif both samples belong to the same person.scoreobjectRequiredoperationIdstringRequiredIdentifier of the operation.
Status codes
- 200Comparison finished. Read
matched. - 400Invalid request, or the templates are suspiciously identical.
ATTACK_SUSPECTED. - 401Invalid or expired auth token.
TOKEN_NOT_VALID. - 403The biometric method is not enabled for the application.
BIOMETRIC_METHOD_NOT_ENABLED. - 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/matching/voice/template' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'source=@reference.wav' \
-F 'probe=@voice.wav'
application/json{
"matched": true,
"score": {
"liveness": 0.96,
"matching": 0.91,
"identityVerification": 0.93
},
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}