> For the complete documentation index, see [llms.txt](https://api-old.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-old.innov8tif.com/okayface/1-1-face-verification-v2-1.md).

# 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

![](/files/-M0LHVNRJN9g-RNoLT9p)

{% file src="/files/-Lx4UwZAyYKX2wvJhWe6" %}
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.
