API Guide

Face Compare API

19min

Compare two faces to measure similiarity.

✅ Checklist

1

If your organization or service maintains stric security policies by denying access to most or all external websites, it's likely you'll need to add our static IP to a whitelist.

2

Please request [email protected] to Whitelist IP Address


Compare two faces to measure similarity
POST
Request
Header Parameters
x-api-key
required
String
Workspace API Key
Body Parameters
body
required
Object
object


Image File Restrictions

  • Supported File Formats: JPEG, JPG, PNG, BMP
  • File Size Limit: Each image must be less than 5MB.
  • Image Dimensions: In a 1920x1080 pixel image, the face must be at least 50x50 pixels to be detected.

Error Codes

1000

Two Images are Required



1001

Workspace is unavailable



1010

callbackUrl is required



Callback URL Response

Parameters

statusCode number

Status Code for the API request result



apiType string

API type



transactionId string

Unique identifier for each request



result object

Object containing the processing result



result.face object

Recognition result of the originFace



result.face.isAvailable boolean

Presence of the recognized originFace



result.face.boundingBox object

Bounding Box object for the recognized originFace



result.face.boundingBox.Width number

Width coordinate of the Bounding Box for originFace



result.face.boundingBox.Height number

Height coordinate of the Bounding Box for originFace



result.face.boundingBox.Left number

Left coordinate of the Bounding Box for originFace



result.face.boundingBox.Top number

Top coordinate of the Bounding Box for originFace



result.faceMatch object

Recognition and comparison result of the targetFace



result.faceMatch.isAvailable boolean

Presence of the recognized targetFace



result.faceMatch.similarity number

Similarity between originFace and targetFace



result.faceMatch.confidence number

Confidence level of the targetFace



result.faceMatch.boundingBox object

Bounding Box object for the recognized targetFace



result.faceMatch.boundingBox.Width number

Width coordinate of the Bounding Box for targetFace



result.faceMatch.boundingBox.Height number

Height coordinate of the Bounding Box for targetFace



result.faceMatch.boundingBox.Left number

Left coordinate of the Bounding Box for targetFace



result.faceMatch.boundingBox.Top number

Top coordinate of the Bounding Box for targetFace



Callback Response Example

Success
Error



Error Codes

1002

Failed to compare face.



1003

Failed to process data