# 1:1 Face Verification V4-1

## 1:1 Face Verification With Liveness Detection

<mark style="color:green;">`POST`</mark> `http://demo.faceid.asia/api/faceid/v4-1/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":0.51890767}}
```

{% 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-Lvj9iXk7D7PUhDhI_fv%2F-LvjA0OBxo6-wU4SchY1%2FOkayFace%20v4-1.postman_collection.json?alt=media&token=ef5f43cc-6f9e-480f-98dc-d8a172858085>" %}
OkayFace v4-1
{% endfile %}

### Interpretation of Result

| Key         | Value                                                |
| ----------- | ---------------------------------------------------- |
| confidence  | Test passes if more than 1.0(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".
* Value 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.
