Face Comparison API - Global

The face comparison API is utilized to determine whether the faces in two images are the same, providing a measure of similarity between them.

API Method

Base URL


URLRequest MethodsContent-TypeOutput FormatCharacter Set
partner_codeStringPartner CodeRequiredAssigned by TD
partner_keyStringPartner KeyRequiredAssigned by TD


face_imageStringFace imageRequiredBase64 (NO WRAP) of face or live photo in JPG or JPEG format, within 3M
id_imageStringID card portrait page imageRequiredJPG, JPEG format including base64 (NO WRAP) of face ID photo, within 3M
countryStringCountryRequired2-digit ISO country code (ISO 3166 standard). In capital letters. Eg. "PH" for Philippines.

Response Parameter

resultStringPortrait comparison resultsEnumeration value: pass, fail
pass: similarity ≥75,which means the same person;
fail: similarity <75, which means different person
similarityDoubleSimilarity percentage for portrait comparison0~100, can choose your own similarity threshold based on risk appetite regardless of above result value

API Status Code

12404Face has not been detectedYES
12405Image feature extraction processing failedYES
11301{parameter} emptyNO
11304The country partner located is not openNO
11340{parameter} errorNO
11350Internal errorNO
301Service not purchasedNO
302Service has been suspendNO
303Not enough balanceNO
304Service expiredNO
305Daily maximum volume reachedNO

Response Example

  • Success
"code": 200,
"message": "success",
"result": "pass",
"sequence_id": "c7920f4a23264ed0a376f8647e14e34b",
"similarity": 89.7134
  • Failed
"code": 11340,
"message": "The country partner located is not open",
"sequence_id": "d2b38289a10f48d487ee7317260078c0"