---
updatedAt: 2026-08-07T08:07:40.000Z
agentTools:
  projectIndex: https://docs.verihubs.com/llms.txt
---

# Sandbox - Compare Face

This method helps you to compare face between 2 images<br>

The following table describes the image option to be used as input.<br>
Image scenario consists of Person A to J. Person is described in the last character: _A means person A, _B means person B, up until _J means person_J. Besides, image scenario consists of number of face in single image 1-9.  Number of Face is described in the last character, which are _1 means 1 face in photo, _2 means 2 face in photo.<br>

| Images                          | Description                                                                                               |
|---------------------------------|-----------------------------------------------------------------------------------------------------------|
| IMAGE_EXCEED_LIMIT              | Photo with size > 5MiB                                                                                    |
| NO_FACE_PHOTO                   | Photo with no face detected                                                                               |
| LIVE_PERSON_A_N                   | Photo of Live Person (A)                                                                                  |
| LIVE_PERSON_M_A_N                 | Photo of Live Person (A) wearing Mask                                                                     |
| LIVE_PERSON_V_A_N                 | Photo of Live Person (A) wearing Veil                                                                     |
| LIVE_PERSON_S_A_N                 | Photo of Live Person (A) wearing Sunglasses                                                               |
| LIVE_PERSON_MV_A_N                | Photo of Live Person (A) wearing Mask, Veil                                                               |
| LIVE_PERSON_MS_A_N                | Photo of Live Person (A) wearing Mask, Sunglasses                                                         |
| LIVE_PERSON_VS_A_N                | Photo of Live Person (A) wearing Veil, Sunglasses                                                         |
| LIVE_PERSON_MVS_A_N               | Photo of Live Person (A) wearing Mask, Veil, Sunglasses                                                   |
| LIVE_PERSON_BLUR_A_N              | Photo of Live Person (A) with blur condition                                                              |
| LIVE_PERSON_DARK_A_N              | Photo of Live Person (A) with dark condition                                                              |
| LIVE_PERSON_BLURDARK_A_N          | Photo of Live Person (A) with blur and dark condition                                                     |
| LIVE_PERSON_BLUR_M_A_N            | Photo of Live Person (A) wearing Mask, with blur condition                                                |
| LIVE_PERSON_BLUR_V_A_N            | Photo of Live Person (A) wearing Veil, with blur condition                                                |
| LIVE_PERSON_BLUR_S_A_N            | Photo of Live Person (A) wearing Sunglasses, with blur condition                                          |
| LIVE_PERSON_BLUR_MV_A_N           | Photo of Live Person (A) wearing Mask, Veil, with blur condition                                          |
| LIVE_PERSON_BLUR_MS_A_N           | Photo of Live Person (A) wearing Mask, Sunglasses with blur condition                                     |
| LIVE_PERSON_BLUR_VS_A_N           | Photo of Live Person (A) wearing Veil, Sunglasses, with blur condition                                    |
| LIVE_PERSON_BLUR_MVS_A_N          | Photo of Live Person (A) wearing Mask, Veil, Sunglasses, with blur condition                              |
| LIVE_PERSON_DARK_M_A_N            | Photo of Live Person (A) wearing Mask, with dark condition                                                |
| LIVE_PERSON_DARK_V_A_N            | Photo of Live Person (A) wearing Veil, with dark condition                                                |
| LIVE_PERSON_DARK_S_A_N            | Photo of Live Person (A) wearing Sunglasses, with dark condition                                          |
| LIVE_PERSON_DARK_MV_A_N           | Photo of Live Person (A) wearing Mask, Veil, with dark condition                                          |
| LIVE_PERSON_DARK_MS_A_N           | Photo of Live Person (A) wearing Mask, Sunglasses, with dark condition                                    |
| LIVE_PERSON_DARK_VS_A_N           | Photo of Live Person (A) wearing Veil, Sunglasses with blur and dark condition                            |
| LIVE_PERSON_DARK_MVS_A_N          | Photo of Live Person (A) wearing Mask, Veil, Sunglasses, with dark condition                              |
| LIVE_PERSON_BLURDARK_M_A_N        | Photo of Live Person (A) wearing Mask, with blur and dark condition                                       |
| LIVE_PERSON_BLURDARK_V_A_N        | Photo of Live Person (A) wearing Veil, with blur and dark condition                                       |
| LIVE_PERSON_BLURDARK_S_A_N        | Photo of Live Person (A) wearing Sunglasses, with blur and dark condition                                 |
| LIVE_PERSON_BLURDARK_MV_A_N       | Photo of Live Person (A) wearing Mask, Veil, with blur and dark condition                                 |
| LIVE_PERSON_BLURDARK_MS_A_N       | Photo of Live Person (A) wearing Mask, Sunglasses, with blur and dark condition                           |
| LIVE_PERSON_BLURDARK_VS_A_N       | Photo of Live Person (A) wearing Veil, Sunglasses with blur and blur and dark condition                   |
| LIVE_PERSON_BLURDARK_MVS_A_N      | Photo of Live Person (A) wearing Mask, Veil, Sunglasses, with blur and dark condition                     |
| SPOOF_PERSON_A_N                  | Photo of Spoof Person (A)                                                                                 |
| SPOOF_PERSON_M_A_N                | Photo of Spoof Person (A) wearing Mask                                                                    |
| SPOOF_PERSON_V_A_N                | Photo of Spoof Person (A) wearing Veil                                                                    |
| SPOOF_PERSON_S_A_N                | Photo of Spoof Person (A) wearing Sunglasses                                                              |
| SPOOF_PERSON_MV_A_N               | Photo of Spoof Person (A) wearing Mask, Veil                                                              |
| SPOOF_PERSON_MS_A_N               | Photo of Spoof Person (A) wearing Mask, Sunglasses                                                        |
| SPOOF_PERSON_VS_A_N               | Photo of Spoof Person (A) wearing Veil, Sunglasses                                                        |
| SPOOF_PERSON_MVS_A_N              | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses                                                  |
| SPOOF_PERSON_BLUR_A_N             | Photo of Spoof Person (A) with blur condition                                                             |
| SPOOF_PERSON_DARK_A_N             | Photo of Spoof Person (A) with dark condition                                                             |
| SPOOF_PERSON_BLURDARK_A_N         | Photo of Spoof Person (A) with blur and dark condition                                                    |
| SPOOF_PERSON_GRAY_A_N             | Photo of Spoof Person (A) in grayscale image                                                              |
| SPOOF_PERSON_GRAY_M_A_N           | Photo of Spoof Person (A) in grayscale image wearing Mask                                                 |
| SPOOF_PERSON_GRAY_V_A_N           | Photo of Spoof Person (A) in grayscale image wearing Veil                                                 |
| SPOOF_PERSON_GRAY_S_A_N           | Photo of Spoof Person (A) in grayscale image wearing Sunglasses                                           |
| SPOOF_PERSON_GRAY_MV_A_N          | Photo of Spoof Person (A) in grayscale image wearing Mask, Veil                                           |
| SPOOF_PERSON_GRAY_MS_A_N          | Photo of Spoof Person (A) in grayscale image wearing Mask, Sunglasses                                     |
| SPOOF_PERSON_GRAY_VS_A_N          | Photo of Spoof Person (A) in grayscale image wearing Veil, Sunglasses                                     |
| SPOOF_PERSON_GRAY_MVS_A_N         | Photo of Spoof Person (A) in grayscale image wearing Mask, Veil, Sunglasses                               |
| SPOOF_PERSON_GRAYBLUR_A_N         | Photo of Spoof Person (A) in grayscale image with blur condition                                          |
| SPOOF_PERSON_GRAYDARK_A_N         | Photo of Spoof Person (A) in grayscale image with dark condition                                          |
| SPOOF_PERSON_GRAYBLURDARK_A_N     | Photo of Spoof Person (A) in grayscale image with blur and dark condition                                 |
| SPOOF_PERSON_BLUR_M_A_N           | Photo of Spoof Person (A) wearing Mask, with blur condition                                               |
| SPOOF_PERSON_BLUR_V_A_N           | Photo of Spoof Person (A) wearing Veil, with blur condition                                               |
| SPOOF_PERSON_BLUR_S_A_N           | Photo of Spoof Person (A) wearing Sunglasses, with blur condition                                         |
| SPOOF_PERSON_BLUR_MV_A_N          | Photo of Spoof Person (A) wearing Mask, Veil, with blur condition                                         |
| SPOOF_PERSON_BLUR_MS_A_N          | Photo of Spoof Person (A) wearing Mask, Sunglasses with blur condition                                    |
| SPOOF_PERSON_BLUR_VS_A_N          | Photo of Spoof Person (A) wearing Veil, Sunglasses, with blur condition                                   |
| SPOOF_PERSON_BLUR_MVS_A_N         | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses, with blur condition                             |
| SPOOF_PERSON_DARK_M_A_N           | Photo of Spoof Person (A) wearing Mask, with dark condition                                               |
| SPOOF_PERSON_DARK_V_A_N           | Photo of Spoof Person (A) wearing Veil, with dark condition                                               |
| SPOOF_PERSON_DARK_S_A_N           | Photo of Spoof Person (A) wearing Sunglasses, with dark condition                                         |
| SPOOF_PERSON_DARK_MV_A_N          | Photo of Spoof Person (A) wearing Mask, Veil, with dark condition                                         |
| SPOOF_PERSON_DARK_MS_A_N          | Photo of Spoof Person (A) wearing Mask, Sunglasses, with dark condition                                   |
| SPOOF_PERSON_DARK_VS_A_N          | Photo of Spoof Person (A) wearing Veil, Sunglasses with blur and dark condition                           |
| SPOOF_PERSON_DARK_MVS_A_N         | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses, with dark condition                             |
| SPOOF_PERSON_BLURDARK_M_A_N       | Photo of Spoof Person (A) wearing Mask, with blur and dark condition                                      |
| SPOOF_PERSON_BLURDARK_V_A_N       | Photo of Spoof Person (A) wearing Veil, with blur and dark condition                                      |
| SPOOF_PERSON_BLURDARK_S_A_N       | Photo of Spoof Person (A) wearing Sunglasses, with blur and dark condition                                |
| SPOOF_PERSON_BLURDARK_MV_A_N      | Photo of Spoof Person (A) wearing Mask, Veil, with blur and dark condition                                |
| SPOOF_PERSON_BLURDARK_MS_A_N      | Photo of Spoof Person (A) wearing Mask, Sunglasses, with blur and dark condition                          |
| SPOOF_PERSON_BLURDARK_VS_A_N      | Photo of Spoof Person (A) wearing Veil, Sunglasses with blur and blur and dark condition                  |
| SPOOF_PERSON_BLURDARK_MVS_A_N     | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses, with blur and dark condition                    |
| SPOOF_PERSON_GRAYBLUR_M_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Mask, with blur condition                           |
| SPOOF_PERSON_GRAYBLUR_V_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Veil, with blur condition                           |
| SPOOF_PERSON_GRAYBLUR_S_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Sunglasses, with blur condition                     |
| SPOOF_PERSON_GRAYBLUR_MV_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, with blur condition                     |
| SPOOF_PERSON_GRAYBLUR_MS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Sunglasses, with blur condition               |
| SPOOF_PERSON_GRAYBLUR_VS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Veil, Sunglasses, with blur condition               |
| SPOOF_PERSON_GRAYBLUR_MVS_A_N     | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, Sunglasses with blur condition          |
| SPOOF_PERSON_GRAYDARK_M_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Mask, with dark condition                           |
| SPOOF_PERSON_GRAYDARK_V_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Veil, with dark condition                           |
| SPOOF_PERSON_GRAYDARK_S_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Sunglasses, with dark condition                     |
| SPOOF_PERSON_GRAYDARK_MV_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, with dark condition                     |
| SPOOF_PERSON_GRAYDARK_MS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Sunglasses, with dark condition               |
| SPOOF_PERSON_GRAYDARK_VS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Veil, Sunglasses, with dark condition               |
| SPOOF_PERSON_GRAYDARK_MVS_A_N     | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, Sunglasses with dark condition          |
| SPOOF_PERSON_GRAYBLURDARK_M_A_N   | Photo of Spoof Person (A) in grayscale image, wearing Mask, with blur and dark condition                  |
| SPOOF_PERSON_GRAYBLURDARK_V_A_N   | Photo of Spoof Person (A) in grayscale image, wearing Veil, with blur and dark condition                  |
| SPOOF_PERSON_GRAYBLURDARK_S_A_N   | Photo of Spoof Person (A) in grayscale image, wearing Sunglasses, with blur and dark condition            |
| SPOOF_PERSON_GRAYBLURDARK_MV_A_N  | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, with blur and dark condition            |
| SPOOF_PERSON_GRAYBLURDARK_MS_A_N  | Photo of Spoof Person (A) in grayscale image, wearing Mask, Sunglasses, with blur and dark condition      |
| SPOOF_PERSON_GRAYBLURDARK_VS_A_N  | Photo of Spoof Person (A) in grayscale image, wearing Veil, Sunglasses, with blur and dark condition      |
| SPOOF_PERSON_GRAYBLURDARK_MVS_A_N | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, Sunglasses with blur and dark condition |


The following table describes the similarity between the images. Only the same photo could give 100% similarity.

| SIMILARITY | A           | B           | C           | D           | E           | F           | G           | H           | I           | J           |
|------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|
| A          | SAME PERSON |             |             |             |             |             |             |             |             |             |
| B          | SIMILAR     | SAME PERSON |             |             |             |             |             |             |             |             |
| C          | SIMILAR     | SIMILAR     | SAME PERSON |             |             |             |             |             |             |             |
| D          | SIMILAR     | SIMILAR     | DIFFERENT   | SAME PERSON |             |             |             |             |             |             |
| E          | DIFFERENT   | SIMILAR     | DIFFERENT   | SIMILAR     | SAME PERSON |             |             |             |             |             |
| F          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SAME PERSON |             |             |             |             |
| G          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | SIMILAR     | SAME PERSON |             |             |             |
| H          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | SIMILAR     | DIFFERENT   | SAME PERSON |             |             |
| I          | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | DIFFERENT   | SIMILAR     | SIMILAR     | DIFFERENT   | SAME PERSON |             |
| J          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | SIMILAR     | SIMILAR     | SIMILAR     | SIMILAR     | SAME PERSON |

<br>
You will receive a response consists of message and an error code if the request fails to process. The following is a list of error codes.
<br>

| Error code                    | Description                                  |
| ------------------------------|:---------------------------------------------|
| INVALID_PAYLOAD                | no value in payload or empty string more than 1  |
| INVALID_PAYLOAD_IMAGE_1_SIZE    | invalid payload image 1 size too large |
| INVALID_PAYLOAD_IMAGE_2_SIZE    | invalid payload image 2 size too large |
| MISSING_PAYLOAD_IMAGE_1        |  missing payload image 1                      |
| MISSING_PAYLOAD_IMAGE_2         |  missing payload image 2                      |
| INVALID_PAYLOAD_IMAGE_1_MISSING | image 1 empty string  |
| INVALID_PAYLOAD_IMAGE_2_MISSING | image 2 empty string  |
| INVALID_PAYLOAD_THRESHOLD_MISSING | threshold must be basic/moderate/high  |
| FACE_NOT_DETECTED              | face not detected from image              |
| INVALID_SANDBOX_IMAGE_1_CODE    | image 1 not exist in image code sandbox |
| INVALID_SANDBOX_IMAGE_2_CODE    | image 2 not exist in image code sandbox |
| INVALID_SANDBOX_IDENTITY      | identity of image 1 or image 2 not between A-J |
| INVALID_SANDBOX_NFACE   | number of face in image not 1-9|
| INVALID_PAYLOAD_QUALITY_VALIDATION_DEPENDENCY  | is_quality must be true if validate_quality true |
| INVALID_PAYLOAD_ATTRIBUTE_VALIDATION_DEPENDENCY  | is_attribute must be true if validate_attribute true |
| INVALID_PAYLOAD_LIVENESS_VALIDATION_DEPENDENCY  | is_liveness must be true if validate_liveness true |
| FAIL_ON_1                      | fail on liveness                          |
| FAIL_ON_2                      | fail on attribute                         |
| FAIL_ON_3                      | fail on liveness and attribute            |
| FAIL_ON_4                      | fail on quality                           |
| FAIL_ON_5                      | fail on liveness and quality              |
| FAIL_ON_6                      | fail on attribute and quality             |
| FAIL_ON_7                      | fail on liveness, attribute, and quality  |
|FAIL_ON_8            |fail on number of face (nface)|
|FAIL_ON_9            |fail on number of face (nface) and liveness|
|FAIL_ON_10            |fail on nfail on number of face (nface) and attribute|
|FAIL_ON_11            |fail on number of face (nface), attribute, and liveness|
|FAIL_ON_12            |fail on number of face (nface) and quality|
|FAIL_ON_13            |fail on number of face (nface), quality, and liveness|
|FAIL_ON_14            |fail on number of face (nface), quality, and attribute|
|FAIL_ON_15            |fail on number of face (nface), quality, attribute, and liveness|
|FAIL_ON_16            |fail on similarity status|
| INTERNAL_SERVER_ERROR         | internal server error |


# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "servers": [
    {
      "url": "https://api.verihubs.com"
    }
  ],
  "info": {
    "title": "Sandbox - AI API Documentation",
    "version": "2.0.0"
  },
  "tags": [
    {
      "name": "Face",
      "description": "Get information about Face API (Sandbox)"
    }
  ],
  "paths": {
    "/v1/face/compare": {
      "post": {
        "tags": [
          "Face"
        ],
        "summary": "Sandbox - Compare Face",
        "description": "This method helps you to compare face between 2 images<br>\n\nThe following table describes the image option to be used as input.<br>\nImage scenario consists of Person A to J. Person is described in the last character: _A means person A, _B means person B, up until _J means person_J. Besides, image scenario consists of number of face in single image 1-9.  Number of Face is described in the last character, which are _1 means 1 face in photo, _2 means 2 face in photo.<br>\n\n| Images                          | Description                                                                                               |\n|---------------------------------|-----------------------------------------------------------------------------------------------------------|\n| IMAGE_EXCEED_LIMIT              | Photo with size > 5MiB                                                                                    |\n| NO_FACE_PHOTO                   | Photo with no face detected                                                                               |\n| LIVE_PERSON_A_N                   | Photo of Live Person (A)                                                                                  |\n| LIVE_PERSON_M_A_N                 | Photo of Live Person (A) wearing Mask                                                                     |\n| LIVE_PERSON_V_A_N                 | Photo of Live Person (A) wearing Veil                                                                     |\n| LIVE_PERSON_S_A_N                 | Photo of Live Person (A) wearing Sunglasses                                                               |\n| LIVE_PERSON_MV_A_N                | Photo of Live Person (A) wearing Mask, Veil                                                               |\n| LIVE_PERSON_MS_A_N                | Photo of Live Person (A) wearing Mask, Sunglasses                                                         |\n| LIVE_PERSON_VS_A_N                | Photo of Live Person (A) wearing Veil, Sunglasses                                                         |\n| LIVE_PERSON_MVS_A_N               | Photo of Live Person (A) wearing Mask, Veil, Sunglasses                                                   |\n| LIVE_PERSON_BLUR_A_N              | Photo of Live Person (A) with blur condition                                                              |\n| LIVE_PERSON_DARK_A_N              | Photo of Live Person (A) with dark condition                                                              |\n| LIVE_PERSON_BLURDARK_A_N          | Photo of Live Person (A) with blur and dark condition                                                     |\n| LIVE_PERSON_BLUR_M_A_N            | Photo of Live Person (A) wearing Mask, with blur condition                                                |\n| LIVE_PERSON_BLUR_V_A_N            | Photo of Live Person (A) wearing Veil, with blur condition                                                |\n| LIVE_PERSON_BLUR_S_A_N            | Photo of Live Person (A) wearing Sunglasses, with blur condition                                          |\n| LIVE_PERSON_BLUR_MV_A_N           | Photo of Live Person (A) wearing Mask, Veil, with blur condition                                          |\n| LIVE_PERSON_BLUR_MS_A_N           | Photo of Live Person (A) wearing Mask, Sunglasses with blur condition                                     |\n| LIVE_PERSON_BLUR_VS_A_N           | Photo of Live Person (A) wearing Veil, Sunglasses, with blur condition                                    |\n| LIVE_PERSON_BLUR_MVS_A_N          | Photo of Live Person (A) wearing Mask, Veil, Sunglasses, with blur condition                              |\n| LIVE_PERSON_DARK_M_A_N            | Photo of Live Person (A) wearing Mask, with dark condition                                                |\n| LIVE_PERSON_DARK_V_A_N            | Photo of Live Person (A) wearing Veil, with dark condition                                                |\n| LIVE_PERSON_DARK_S_A_N            | Photo of Live Person (A) wearing Sunglasses, with dark condition                                          |\n| LIVE_PERSON_DARK_MV_A_N           | Photo of Live Person (A) wearing Mask, Veil, with dark condition                                          |\n| LIVE_PERSON_DARK_MS_A_N           | Photo of Live Person (A) wearing Mask, Sunglasses, with dark condition                                    |\n| LIVE_PERSON_DARK_VS_A_N           | Photo of Live Person (A) wearing Veil, Sunglasses with blur and dark condition                            |\n| LIVE_PERSON_DARK_MVS_A_N          | Photo of Live Person (A) wearing Mask, Veil, Sunglasses, with dark condition                              |\n| LIVE_PERSON_BLURDARK_M_A_N        | Photo of Live Person (A) wearing Mask, with blur and dark condition                                       |\n| LIVE_PERSON_BLURDARK_V_A_N        | Photo of Live Person (A) wearing Veil, with blur and dark condition                                       |\n| LIVE_PERSON_BLURDARK_S_A_N        | Photo of Live Person (A) wearing Sunglasses, with blur and dark condition                                 |\n| LIVE_PERSON_BLURDARK_MV_A_N       | Photo of Live Person (A) wearing Mask, Veil, with blur and dark condition                                 |\n| LIVE_PERSON_BLURDARK_MS_A_N       | Photo of Live Person (A) wearing Mask, Sunglasses, with blur and dark condition                           |\n| LIVE_PERSON_BLURDARK_VS_A_N       | Photo of Live Person (A) wearing Veil, Sunglasses with blur and blur and dark condition                   |\n| LIVE_PERSON_BLURDARK_MVS_A_N      | Photo of Live Person (A) wearing Mask, Veil, Sunglasses, with blur and dark condition                     |\n| SPOOF_PERSON_A_N                  | Photo of Spoof Person (A)                                                                                 |\n| SPOOF_PERSON_M_A_N                | Photo of Spoof Person (A) wearing Mask                                                                    |\n| SPOOF_PERSON_V_A_N                | Photo of Spoof Person (A) wearing Veil                                                                    |\n| SPOOF_PERSON_S_A_N                | Photo of Spoof Person (A) wearing Sunglasses                                                              |\n| SPOOF_PERSON_MV_A_N               | Photo of Spoof Person (A) wearing Mask, Veil                                                              |\n| SPOOF_PERSON_MS_A_N               | Photo of Spoof Person (A) wearing Mask, Sunglasses                                                        |\n| SPOOF_PERSON_VS_A_N               | Photo of Spoof Person (A) wearing Veil, Sunglasses                                                        |\n| SPOOF_PERSON_MVS_A_N              | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses                                                  |\n| SPOOF_PERSON_BLUR_A_N             | Photo of Spoof Person (A) with blur condition                                                             |\n| SPOOF_PERSON_DARK_A_N             | Photo of Spoof Person (A) with dark condition                                                             |\n| SPOOF_PERSON_BLURDARK_A_N         | Photo of Spoof Person (A) with blur and dark condition                                                    |\n| SPOOF_PERSON_GRAY_A_N             | Photo of Spoof Person (A) in grayscale image                                                              |\n| SPOOF_PERSON_GRAY_M_A_N           | Photo of Spoof Person (A) in grayscale image wearing Mask                                                 |\n| SPOOF_PERSON_GRAY_V_A_N           | Photo of Spoof Person (A) in grayscale image wearing Veil                                                 |\n| SPOOF_PERSON_GRAY_S_A_N           | Photo of Spoof Person (A) in grayscale image wearing Sunglasses                                           |\n| SPOOF_PERSON_GRAY_MV_A_N          | Photo of Spoof Person (A) in grayscale image wearing Mask, Veil                                           |\n| SPOOF_PERSON_GRAY_MS_A_N          | Photo of Spoof Person (A) in grayscale image wearing Mask, Sunglasses                                     |\n| SPOOF_PERSON_GRAY_VS_A_N          | Photo of Spoof Person (A) in grayscale image wearing Veil, Sunglasses                                     |\n| SPOOF_PERSON_GRAY_MVS_A_N         | Photo of Spoof Person (A) in grayscale image wearing Mask, Veil, Sunglasses                               |\n| SPOOF_PERSON_GRAYBLUR_A_N         | Photo of Spoof Person (A) in grayscale image with blur condition                                          |\n| SPOOF_PERSON_GRAYDARK_A_N         | Photo of Spoof Person (A) in grayscale image with dark condition                                          |\n| SPOOF_PERSON_GRAYBLURDARK_A_N     | Photo of Spoof Person (A) in grayscale image with blur and dark condition                                 |\n| SPOOF_PERSON_BLUR_M_A_N           | Photo of Spoof Person (A) wearing Mask, with blur condition                                               |\n| SPOOF_PERSON_BLUR_V_A_N           | Photo of Spoof Person (A) wearing Veil, with blur condition                                               |\n| SPOOF_PERSON_BLUR_S_A_N           | Photo of Spoof Person (A) wearing Sunglasses, with blur condition                                         |\n| SPOOF_PERSON_BLUR_MV_A_N          | Photo of Spoof Person (A) wearing Mask, Veil, with blur condition                                         |\n| SPOOF_PERSON_BLUR_MS_A_N          | Photo of Spoof Person (A) wearing Mask, Sunglasses with blur condition                                    |\n| SPOOF_PERSON_BLUR_VS_A_N          | Photo of Spoof Person (A) wearing Veil, Sunglasses, with blur condition                                   |\n| SPOOF_PERSON_BLUR_MVS_A_N         | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses, with blur condition                             |\n| SPOOF_PERSON_DARK_M_A_N           | Photo of Spoof Person (A) wearing Mask, with dark condition                                               |\n| SPOOF_PERSON_DARK_V_A_N           | Photo of Spoof Person (A) wearing Veil, with dark condition                                               |\n| SPOOF_PERSON_DARK_S_A_N           | Photo of Spoof Person (A) wearing Sunglasses, with dark condition                                         |\n| SPOOF_PERSON_DARK_MV_A_N          | Photo of Spoof Person (A) wearing Mask, Veil, with dark condition                                         |\n| SPOOF_PERSON_DARK_MS_A_N          | Photo of Spoof Person (A) wearing Mask, Sunglasses, with dark condition                                   |\n| SPOOF_PERSON_DARK_VS_A_N          | Photo of Spoof Person (A) wearing Veil, Sunglasses with blur and dark condition                           |\n| SPOOF_PERSON_DARK_MVS_A_N         | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses, with dark condition                             |\n| SPOOF_PERSON_BLURDARK_M_A_N       | Photo of Spoof Person (A) wearing Mask, with blur and dark condition                                      |\n| SPOOF_PERSON_BLURDARK_V_A_N       | Photo of Spoof Person (A) wearing Veil, with blur and dark condition                                      |\n| SPOOF_PERSON_BLURDARK_S_A_N       | Photo of Spoof Person (A) wearing Sunglasses, with blur and dark condition                                |\n| SPOOF_PERSON_BLURDARK_MV_A_N      | Photo of Spoof Person (A) wearing Mask, Veil, with blur and dark condition                                |\n| SPOOF_PERSON_BLURDARK_MS_A_N      | Photo of Spoof Person (A) wearing Mask, Sunglasses, with blur and dark condition                          |\n| SPOOF_PERSON_BLURDARK_VS_A_N      | Photo of Spoof Person (A) wearing Veil, Sunglasses with blur and blur and dark condition                  |\n| SPOOF_PERSON_BLURDARK_MVS_A_N     | Photo of Spoof Person (A) wearing Mask, Veil, Sunglasses, with blur and dark condition                    |\n| SPOOF_PERSON_GRAYBLUR_M_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Mask, with blur condition                           |\n| SPOOF_PERSON_GRAYBLUR_V_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Veil, with blur condition                           |\n| SPOOF_PERSON_GRAYBLUR_S_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Sunglasses, with blur condition                     |\n| SPOOF_PERSON_GRAYBLUR_MV_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, with blur condition                     |\n| SPOOF_PERSON_GRAYBLUR_MS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Sunglasses, with blur condition               |\n| SPOOF_PERSON_GRAYBLUR_VS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Veil, Sunglasses, with blur condition               |\n| SPOOF_PERSON_GRAYBLUR_MVS_A_N     | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, Sunglasses with blur condition          |\n| SPOOF_PERSON_GRAYDARK_M_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Mask, with dark condition                           |\n| SPOOF_PERSON_GRAYDARK_V_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Veil, with dark condition                           |\n| SPOOF_PERSON_GRAYDARK_S_A_N       | Photo of Spoof Person (A) in grayscale image, wearing Sunglasses, with dark condition                     |\n| SPOOF_PERSON_GRAYDARK_MV_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, with dark condition                     |\n| SPOOF_PERSON_GRAYDARK_MS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Mask, Sunglasses, with dark condition               |\n| SPOOF_PERSON_GRAYDARK_VS_A_N      | Photo of Spoof Person (A) in grayscale image, wearing Veil, Sunglasses, with dark condition               |\n| SPOOF_PERSON_GRAYDARK_MVS_A_N     | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, Sunglasses with dark condition          |\n| SPOOF_PERSON_GRAYBLURDARK_M_A_N   | Photo of Spoof Person (A) in grayscale image, wearing Mask, with blur and dark condition                  |\n| SPOOF_PERSON_GRAYBLURDARK_V_A_N   | Photo of Spoof Person (A) in grayscale image, wearing Veil, with blur and dark condition                  |\n| SPOOF_PERSON_GRAYBLURDARK_S_A_N   | Photo of Spoof Person (A) in grayscale image, wearing Sunglasses, with blur and dark condition            |\n| SPOOF_PERSON_GRAYBLURDARK_MV_A_N  | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, with blur and dark condition            |\n| SPOOF_PERSON_GRAYBLURDARK_MS_A_N  | Photo of Spoof Person (A) in grayscale image, wearing Mask, Sunglasses, with blur and dark condition      |\n| SPOOF_PERSON_GRAYBLURDARK_VS_A_N  | Photo of Spoof Person (A) in grayscale image, wearing Veil, Sunglasses, with blur and dark condition      |\n| SPOOF_PERSON_GRAYBLURDARK_MVS_A_N | Photo of Spoof Person (A) in grayscale image, wearing Mask, Veil, Sunglasses with blur and dark condition |\n\n\nThe following table describes the similarity between the images. Only the same photo could give 100% similarity.\n\n| SIMILARITY | A           | B           | C           | D           | E           | F           | G           | H           | I           | J           |\n|------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------|\n| A          | SAME PERSON |             |             |             |             |             |             |             |             |             |\n| B          | SIMILAR     | SAME PERSON |             |             |             |             |             |             |             |             |\n| C          | SIMILAR     | SIMILAR     | SAME PERSON |             |             |             |             |             |             |             |\n| D          | SIMILAR     | SIMILAR     | DIFFERENT   | SAME PERSON |             |             |             |             |             |             |\n| E          | DIFFERENT   | SIMILAR     | DIFFERENT   | SIMILAR     | SAME PERSON |             |             |             |             |             |\n| F          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SAME PERSON |             |             |             |             |\n| G          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | SIMILAR     | SAME PERSON |             |             |             |\n| H          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | SIMILAR     | DIFFERENT   | SAME PERSON |             |             |\n| I          | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | DIFFERENT   | SIMILAR     | SIMILAR     | DIFFERENT   | SAME PERSON |             |\n| J          | DIFFERENT   | DIFFERENT   | DIFFERENT   | DIFFERENT   | SIMILAR     | SIMILAR     | SIMILAR     | SIMILAR     | SIMILAR     | SAME PERSON |\n\n<br>\nYou will receive a response consists of message and an error code if the request fails to process. The following is a list of error codes.\n<br>\n\n| Error code                    | Description                                  |\n| ------------------------------|:---------------------------------------------|\n| INVALID_PAYLOAD                | no value in payload or empty string more than 1  |\n| INVALID_PAYLOAD_IMAGE_1_SIZE    | invalid payload image 1 size too large |\n| INVALID_PAYLOAD_IMAGE_2_SIZE    | invalid payload image 2 size too large |\n| MISSING_PAYLOAD_IMAGE_1        |  missing payload image 1                      |\n| MISSING_PAYLOAD_IMAGE_2         |  missing payload image 2                      |\n| INVALID_PAYLOAD_IMAGE_1_MISSING | image 1 empty string  |\n| INVALID_PAYLOAD_IMAGE_2_MISSING | image 2 empty string  |\n| INVALID_PAYLOAD_THRESHOLD_MISSING | threshold must be basic/moderate/high  |\n| FACE_NOT_DETECTED              | face not detected from image              |\n| INVALID_SANDBOX_IMAGE_1_CODE    | image 1 not exist in image code sandbox |\n| INVALID_SANDBOX_IMAGE_2_CODE    | image 2 not exist in image code sandbox |\n| INVALID_SANDBOX_IDENTITY      | identity of image 1 or image 2 not between A-J |\n| INVALID_SANDBOX_NFACE   | number of face in image not 1-9|\n| INVALID_PAYLOAD_QUALITY_VALIDATION_DEPENDENCY  | is_quality must be true if validate_quality true |\n| INVALID_PAYLOAD_ATTRIBUTE_VALIDATION_DEPENDENCY  | is_attribute must be true if validate_attribute true |\n| INVALID_PAYLOAD_LIVENESS_VALIDATION_DEPENDENCY  | is_liveness must be true if validate_liveness true |\n| FAIL_ON_1                      | fail on liveness                          |\n| FAIL_ON_2                      | fail on attribute                         |\n| FAIL_ON_3                      | fail on liveness and attribute            |\n| FAIL_ON_4                      | fail on quality                           |\n| FAIL_ON_5                      | fail on liveness and quality              |\n| FAIL_ON_6                      | fail on attribute and quality             |\n| FAIL_ON_7                      | fail on liveness, attribute, and quality  |\n|FAIL_ON_8            |fail on number of face (nface)|\n|FAIL_ON_9            |fail on number of face (nface) and liveness|\n|FAIL_ON_10            |fail on nfail on number of face (nface) and attribute|\n|FAIL_ON_11            |fail on number of face (nface), attribute, and liveness|\n|FAIL_ON_12            |fail on number of face (nface) and quality|\n|FAIL_ON_13            |fail on number of face (nface), quality, and liveness|\n|FAIL_ON_14            |fail on number of face (nface), quality, and attribute|\n|FAIL_ON_15            |fail on number of face (nface), quality, attribute, and liveness|\n|FAIL_ON_16            |fail on similarity status|\n| INTERNAL_SERVER_ERROR         | internal server error |\n",
        "operationId": "compare_face_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "App-ID",
              "type": "string"
            },
            "name": "App-ID",
            "in": "header"
          },
          {
            "required": true,
            "schema": {
              "title": "API-Key",
              "type": "string"
            },
            "name": "API-Key",
            "in": "header"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompareFace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseCompareFace"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationUnauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "message",
          "error_code"
        ],
        "type": "object",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "error_code": {
            "title": "Error_code",
            "type": "string"
          }
        }
      },
      "ValidationUnauthorized": {
        "title": "ValidationUnauthorized",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string",
            "example": "Authorization failed"
          }
        }
      },
      "CompareFace": {
        "title": "CompareFace",
        "required": [
          "image_1",
          "image_2"
        ],
        "type": "object",
        "properties": {
          "image_1": {
            "description": "choice of image, as given in the table",
            "type": "string"
          },
          "image_2": {
            "description": "choice of image, as given in the table",
            "type": "string"
          },
          "is_quality": {
            "description": "A flag to determine whether Image Quality (blur, dark, grayscale) will be computed and return as result",
            "type": "boolean",
            "default": true
          },
          "is_attribute": {
            "description": "A flag to determine whether Image Attribute (sunglasses, mask, veil, hat) will be detected and return as result",
            "type": "boolean",
            "default": true
          },
          "is_liveness": {
            "description": "A flag to determine whether Passive Liveness will be computed and return as result",
            "type": "boolean",
            "default": false
          },
          "validate_quality": {
            "description": "Determines whether Quality validation will be executed. The validation consists of checking blur and dark with threshold 50, and also checking whether the image is a black & white image (grayscale is true)",
            "type": "boolean",
            "default": false
          },
          "validate_attribute": {
            "description": "Determines whether Attribute validation will be executed. The validation consists of checking whether sunglasses or mask is detected in the input image.",
            "type": "boolean",
            "default": false
          },
          "validate_liveness": {
            "description": "Determines whether Liveness validation will be executed. The validation checks whether input image is live / spoof.",
            "type": "boolean",
            "default": false
          },
          "validate_nface": {
            "description": "Determines whether the number of faces validation will be executed. The validation checks whether the input image consists of more than one face. (New)",
            "type": "boolean",
            "default": false
          },
          "threshold": {
            "description": "Determines which threshold level will be used. The threshold either basic/moderate/high.",
            "type": "string"
          }
        }
      },
      "ResponseCompareFace": {
        "title": "ResponseCompareFace",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "status_code": {
            "description": "Status Code",
            "type": "string",
            "example": "FACE-1"
          },
          "message": {
            "description": "Message",
            "type": "string",
            "example": "Face compared successfully"
          },
          "image_1": {
            "description": "Image 1",
            "type": "object",
            "properties": {
              "attributes": {
                "type": "object",
                "properties": {
                  "sunglasses_on": {
                    "type": "boolean"
                  },
                  "mask_on": {
                    "type": "boolean"
                  },
                  "veil_on": {
                    "type": "boolean"
                  },
                  "hat_on": {
                    "type": "boolean"
                  }
                }
              },
              "liveness": {
                "description": "Liveness attribute",
                "type": "object",
                "properties": {
                  "status": {
                    "type": "boolean"
                  },
                  "probability": {
                    "type": "string",
                    "example": "100"
                  }
                }
              },
              "image_quality": {
                "description": "Shows quality of image",
                "type": "object",
                "properties": {
                  "blur": {
                    "type": "boolean"
                  },
                  "dark": {
                    "type": "boolean"
                  },
                  "grayscale": {
                    "type": "boolean"
                  }
                }
              },
              "rotation": {
                "description": "Shows how many rotations need to be done to detect face in image",
                "type": "integer"
              },
              "bounding_box": {
                "description": "Shows result of bounding box",
                "type": "object",
                "properties": {
                  "TopLeftX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "TopLeftY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "BottomRightX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "BottomRightY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "Width": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "Height": {
                    "type": "string",
                    "example": "0.9"
                  }
                }
              },
              "face_landmark": {
                "description": "Shows result of face landmark",
                "type": "object",
                "properties": {
                  "LeftEyeX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "LeftEyeY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "RightEyeX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "RightEyeY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "NoseX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "NoseY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthLeftX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthLeftY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthRightX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthRightY": {
                    "type": "string",
                    "example": "0.9"
                  }
                }
              }
            }
          },
          "image_2": {
            "description": "Image 1",
            "type": "object",
            "properties": {
              "attributes": {
                "type": "object",
                "properties": {
                  "sunglasses_on": {
                    "type": "boolean"
                  },
                  "mask_on": {
                    "type": "boolean"
                  },
                  "veil_on": {
                    "type": "boolean"
                  },
                  "hat_on": {
                    "type": "boolean"
                  }
                }
              },
              "liveness": {
                "description": "Liveness attribute",
                "type": "object",
                "properties": {
                  "status": {
                    "type": "boolean"
                  },
                  "probability": {
                    "type": "string",
                    "example": "100"
                  }
                }
              },
              "image_quality": {
                "description": "Shows quality of image",
                "type": "object",
                "properties": {
                  "blur": {
                    "type": "boolean"
                  },
                  "dark": {
                    "type": "boolean"
                  },
                  "grayscale": {
                    "type": "boolean"
                  }
                }
              },
              "rotation": {
                "description": "Shows how many rotations need to be done to detect face in image",
                "type": "integer"
              },
              "bounding_box": {
                "description": "Shows result of bounding box",
                "type": "object",
                "properties": {
                  "TopLeftX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "TopLeftY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "BottomRightX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "BottomRightY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "Width": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "Height": {
                    "type": "string",
                    "example": "0.9"
                  }
                }
              },
              "face_landmark": {
                "description": "Shows result of face landmark",
                "type": "object",
                "properties": {
                  "LeftEyeX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "LeftEyeY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "RightEyeX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "RightEyeY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "NoseX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "NoseY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthLeftX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthLeftY": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthRightX": {
                    "type": "string",
                    "example": "0.9"
                  },
                  "MouthRightY": {
                    "type": "string",
                    "example": "0.9"
                  }
                }
              }
            }
          },
          "similarity_status": {
            "description": "Shows similarity result",
            "type": "boolean"
          },
          "timestamp": {
            "description": "Shows time which face compared successfully",
            "type": "number"
          },
          "nface": {
            "description": "Shows how many faces are detected in the input image. (New)",
            "type": "integer",
            "example": 1
          }
        }
      }
    }
  }
}
```