Skip to main content

Matching

Matching answers "are these two samples the same person?", without enrolling anyone.

Compare two face samples​

POST/matching/face Access token

Compares 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· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.

Request bodymultipart/form-data

  • livenessMethodnumberOptional

    Liveness method for presentation attack detection: 1 passive video (the user holds still for a moment), 2 passive image. Omit it to send a single image without liveness.

  • sourcefileRequired

    Reference face image, for example the portrait of an identity document.

  • probefileRequired

    Face to compare: an image, or a video when livenessMethod is 1.

Response200 · application/json

  • matchedbooleanRequired

    true if both samples belong to the same person.

  • scoreobjectRequired
  • detectedFaceobjectRequired
  • operationIdstringRequired

    Identifier 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'
Responses
200OKapplication/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​

POST/matching/face/template Access token

Compares two face templates and returns whether they belong to the same person.

Roles: API · SDK

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your 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· base64Required

    Biometric template, in base64.

  • probestring· base64Required

    Template to compare, in base64.

Response200 · application/json

  • matchedbooleanRequired

    true if both templates belong to the same person.

  • scoreobjectRequired
  • operationIdstringRequired

    Identifier 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'
Responses
200OKapplication/json
{
"matched": true,
"score": {
"liveness": 0.96,
"matching": 0.91,
"identityVerification": 0.93
},
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}

Compare two voice samples​

POST/matching/voice Access token

Compares 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· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.

Request bodymultipart/form-data

  • livenessMethodnumberOptional

    Liveness method for voice: 0 (VOICE_PLA) detects replayed recordings and AI-generated voices. Omit it to skip liveness.

  • sourcefileRequired

    Reference voice recording.

  • probefileRequired

    Voice recording to compare.

Response200 · application/json

  • matchedbooleanRequired

    true if both samples belong to the same person.

  • scoreobjectRequired
  • operationIdstringRequired

    Identifier 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'
Responses
200OKapplication/json
{
"matched": true,
"score": {
"liveness": 0.96,
"matching": 0.91,
"identityVerification": 0.93
},
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}

Compare two voice templates​

POST/matching/voice/template Access token

Compares two voice templates and returns whether they belong to the same person.

Roles: API · SDK

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your 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· base64Required

    Biometric template, in base64.

  • probestring· base64Required

    Template to compare, in base64.

Response200 · application/json

  • matchedbooleanRequired

    true if both samples belong to the same person.

  • scoreobjectRequired
  • operationIdstringRequired

    Identifier 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'
Responses
200OKapplication/json
{
"matched": true,
"score": {
"liveness": 0.96,
"matching": 0.91,
"identityVerification": 0.93
},
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}