# 1:1 Face Verification V2-2

## 1:1 Face Verification With Liveness Detection

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

#### Request Body

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

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

```
{"imageBestLiveness":{"probability":1.8339830987201822E-8,"score":-6.1092305183410645,"quality":1.0},"request_id":"53b7443b-2cf9-407e-a710-b304a6a569a5","result_idcard":{"confidence":{"imageBestLiveness":{"probability":0.03970755,"score":-3.1856966,"quality":0.7613958},"request_id":"1588554351758433I8E5268147307508","result_idcard":{"confidence":59.11985}}}}
```

{% endtab %}
{% endtabs %}

### Input Example

{% code title="JSON" %}

```
{
	"apiKey": "apiKey",
	"imageIdCard": "",
	"imageBest": ""
}
```

{% endcode %}

{% file src="<https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-M-TAkQ0Vot2BvQzvlMs%2F-M-TC6gtO9y8l925TiLo%2FOkayFace%20v2-2.postman_collection.json?alt=media&token=14ea0cd8-4ec1-448f-8c58-35b52836d438>" %}

### 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.
