# /face\_liveness

#### Endpoint

```http
https://be.progeny.tech/api/v3/services/face_liveness/
```

#### Purpose

Allows you to connect to the Liveness service, using the provider configured in the **Progeny Console**, to perform a standalone liveness check against an image.  If the `image` parameter is missing from the request, we will return `Bad POST`.

{% hint style="info" %}
Please refer to the section on [images](/our-api/overview.md#a-quick-word-about-images) for guidance before posting.  For the best results, we recommend a maximum height of 1080px.
{% endhint %}

#### Sample request and response

## Get a task Id

<mark style="color:green;">`POST`</mark> `https://be.progeny.tech/api/v3/services/face_liveness/`

#### Request Body

| Name                                    | Type    | Description                                                                                       |
| --------------------------------------- | ------- | ------------------------------------------------------------------------------------------------- |
| image<mark style="color:red;">\*</mark> | String  | The file path to an image of the user's face in PNG, JPEG, or JPG file format                     |
| extend\_data                            | Boolean | Set to true to retrieve the original response from the 3rd-party provider of the Liveness service |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "id": "f22a63b1-7d05-4bf1-9633-a623a2799c22"
}
```

{% endtab %}

{% tab title="400: Bad Request Image is missing or not in the correct format" %}

```javascript
{
    "image": [
        "No file was submitted."
    ]
}
```

{% endtab %}
{% endtabs %}

## Perform a standalone liveness check

<mark style="color:blue;">`GET`</mark> `https://be.progeny.tech/api/v3/services/task/?id={{task_id}}`

#### Path Parameters

| Name                                 | Type   | Description                                     |
| ------------------------------------ | ------ | ----------------------------------------------- |
| id<mark style="color:red;">\*</mark> | String | The task Id you obtained from your POST request |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "id": 2182,
    "status": "SUCCESS",
    "result": {
        "data": {
            "liveness": {
                "data": {
                    "score": 2.5943651,
                    "quality": 0.8175214,
                    "probability": 0.930498
                },
                "result": true
            }
        },
        "status": 200
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Image does not meet requirements" %}

```javascript
{
    "id": 2183,
    "status": "SUCCESS",
    "result": {
        "data": {
            "liveness": {
                "result": false,
                "error": "Absolute face size is too small",
                "error_code": "FACE_TOO_SMALL"
            },
            "issues": {
                "liveness": {
                    "FACE_TOO_SMALL": "Absolute face size is too small"
                }
            }
        },
        "status": 400
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.progeny.tech/our-api/face_liveness.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.
