# 1:1 Face Verification V2-1

## 1:1 Face Verification With Liveness Detection (Encrypted string is not required)

<mark style="color:green;">`POST`</mark> `http://demo.faceid.asia/api/faceid/v2-1/verify`

#### Request Body

| Name         | Type   | Description                 |
| ------------ | ------ | --------------------------- |
| apiKey       | string | To be assigned by Innov8tif |
| imageIdCard  | object | Front id card image         |
| imageBest    | object | Selfie photo                |

{% tabs %}
{% tab title="200 " %}

```
{
"imageBestLiveness":
    {
        "probability":2.492201929271687E-7,
        "score":-5.0898823738098145,
        "quality":1.0
    },
"request_id":"TASKAI208003201910300952440191412201",
"result_idcard":
    {
        "confidence":57.86325
    }
}
```

{% endtab %}
{% endtabs %}

### Input Example in Postman

![](https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-M0LHHyV2BIjOWyLhI7d%2F-M0LHVNRJN9g-RNoLT9p%2FCapture.JPG?alt=media\&token=9ef6f850-8070-4e07-b53b-1d8e295417e6)

{% file src="<https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-Lx4UqNAGKmu843O-7Qm%2F-Lx4UwZAyYKX2wvJhWe6%2FOkayFace%20v2-1.postman_collection.json?alt=media&token=9a409760-2555-4223-931c-7116c9755410>" %}
OkayDoc v2-1
{% endfile %}

### Interpretation of Result

| Key         | Value                                                |
| ----------- | ---------------------------------------------------- |
| confidence  | Test passes if more than 75 (recommended threshold)  |
| probability | Probability of liveness                              |
| score       | Linear liveness score: bigger value means more alive |
| quality     | Quality value                                        |
| error       | Error message from the server                        |

* Probability of liveness is a main response of the system.
* The image is accepted as "**live**" when a ***probability*** is **bigger** than **0.5**.
* Linear liveness score can be used for BPCER / APCER tuning.&#x20;
* The range of score is (ln 1e-7, -ln 1e-7).
* Quality value is a probability of "appropriate image".
* Probability can be **lower** than **0.5** by the reasons below.

  * Face minimal side is less than 180 pix or distance between eyes is less than 90 pix.
  * Face out-of-plane rotation is bigger than 20 degrees.
  * The distance between face and camera is very small, so the face can be significantly distorted.
  * The luminous power is insufficient.
  * High motion or gaussian blur rate or light shot.

> We highly advise to analyze quality value and reject inappropriate images.
