# 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="/files/-LvjA0OBxo6-wU4SchY1" %}
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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-old.innov8tif.com/okayface/1-1-face-verification-v4-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
