> For the complete documentation index, see [llms.txt](https://api2-ekycportal.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api2-ekycportal.innov8tif.com/experimental-space/emas-ekyc-portal/centralized-okaylive.md).

# Centralized OkayLive

## Overview

The Centralized OkayLive API also known as "Liveness Detection" is to make sure that the selfie is taken by a real person. This will greatly increase the security level of Facial Verification in order to help to fight against spoof attacks using fake selfies *(e.g. recapturing a selfie from monitor screens, printed paper and etc)*

#### Steps:

1. Users can choose to **skip** this API if the user has **activated** the "liveness detection" parameter in the Centralized OkayFace API. Else, the user can proceed by following the steps.
2. Place the JourneyId and the content mentioned in the [API method](#api-method) below.
3. After expanding the API method, the user can read the descriptions on each parameter and place the details accordingly following this [Example](#input-example).
4. The API will return a number of values and the user can refer to this [page](/experimental-space/emas-ekyc-portal/image-requirement/okaylive.md) for more details.
5. The average processing time is 2s to 3s.

{% hint style="info" %}
Please refer to the "[<mark style="color:orange;">Image Requirement</mark>](/experimental-space/emas-ekyc-portal/image-requirement/okaylive.md)" section to get the best result for each API return
{% endhint %}

## API Method

<mark style="color:green;">`POST`</mark> `https://ekycportaldemo.innov8tif.com/api/ekyc/okaylive`

#### Request Body

| Name                                         | Type   | Description                          |
| -------------------------------------------- | ------ | ------------------------------------ |
| imageBest <mark style="color:red;">\*</mark> | object | Selfie photo                         |
| journeyId<mark style="color:red;">\*</mark>  | string | Retrieve from 'Create JourneyID' API |

{% tabs %}
{% tab title="200 Successfully response to the user " %}
{% code title="Request Code Block" %}

```
{
    "status": "success",
    "messageCode": "api.success",
    "probability": 0.9999331,
    "score": 9.612308,
    "quality": 0.6691686
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request Failed to response to the user" %}

```javascript
{
    status: "error"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}

```javascript
{
    status:"Internal Server Error"
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Kindly refer to the page below for the interpretation of the result.
{% endhint %}

{% content-ref url="/spaces/RYsITG7N76MNv67B20iW/pages/t76J963SHPmZ6fNNwhHV" %}
[Interpretation of Result and Recommended Threshold](/emas-ekyc-portal/centralized-okaylive/interpretation-of-result-and-recommended-threshold.md)
{% endcontent-ref %}

### Input Example

![Input image as image file](/files/tr7vo6mus6uc0qpwi1JG)

{% hint style="info" %}
This OkayLive API component only accepts image file as input
{% endhint %}

#### Postman Collection

{% hint style="info" %}
Get the Postman Collection\
<https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/postman-collection>
{% endhint %}
