Face comparison
Compare a reference photo with a second image. Get a 1:1 similarity score and a match decision against the applied threshold.
/face/comparemultipart/form-dataRequest
Send source (the reference image) and target (the image to compare) as multipart form-data. Use a single, clearly visible face in the source image.
| Form field | Type | Required |
|---|---|---|
source | Image file | Yes |
target | Image file | Yes |
Set RAPIDAPI_KEY and RAPIDAPI_HOST to the values from this API’s listing. The following example uses a POSIX shell. Replace the local filenames with your images.
curl --request POST \
--url "https://$RAPIDAPI_HOST/face/compare" \
--header "X-RapidAPI-Key: $RAPIDAPI_KEY" \
--header "X-RapidAPI-Host: $RAPIDAPI_HOST" \
--form 'source=@./source.jpg' \
--form 'target=@./target.jpg'Response example
{
"matched": true,
"similarity": 99.98,
"threshold": 90,
"sourceFaceConfidence": 99.99,
"matchedFace": {
"left": 0.2,
"top": 0.1,
"width": 0.5,
"height": 0.6
},
"targetFacesChecked": 1
}Response fields
| Field | Type | Meaning |
|---|---|---|
matched | boolean | Whether similarity reaches the applied threshold. |
similarity | number | null | Best-match score from 0 to 100. Null when no comparable face is found. |
threshold | number | The threshold used for the decision. The published default is 90. |
sourceFaceConfidence | number | Confidence that a face was detected in the reference image. |
matchedFace | object | Bounding box of the matching target face, using image-relative coordinates. |
targetFacesChecked | number | Number of target faces compared. |
This endpoint compares two images. It does not perform 1:N face search or establish whether a person is physically present. Facial liveness is a separate planned capability.
Limits and integration notes
- The published image upload limit is 20 MB. Resize files that exceed the limit before sending them.
- Keep keys server-side and use the correct host for the API. See authentication.
- Handle bad inputs and temporary failures using the error guide.
- Vision input images are processed in-request without storage by Tigrate. See data handling.
Based on the published RapidAPI reference, checked September 2026. Consult the listing for the latest full schema, optional parameters, and plan limits.