---
title: Passive Liveliness for Image API
slug: v2/passive-liveliness-for-image-api
description: Learn about Signzy's liveness check feature to prevent spoofing attacks and ensure the presence of a live person in onboarding processes. This document outlines the API's capability to detect various input formats, handle multiple people in front of the c
createdAt: 2022-09-19T07:28:09.000Z
---

# Introduction

Liveness check helps to detect if a live person is present in front of the camera during any onboarding process and also helps to identify any spoofing attack done by fraudsters. This is the best used with the Signzy face match solution

### Feature Highlights

- Supports JPEG, PNG, TIFF and PDF as input.
- Detects any spoofing attempt like Photo of a Photo, Video Recording, etc
- Multiple people in front of the camera
- Powerful RestAPI’s which works with both Mobile & Web

## How to call the API

You will need to **login** before sending the request. You are required to pass the access token received from the login call, as authorization header in the Passive Liveliness for Image request.

## API Input Guidelines

### Image Requirements

- Recommended height - 720p or 1080p.
- Minimal supported height - 480p
- No image compression is highly recommended: JPEG 70 is the lowest practical compression level
- Maximum Size support 50 MB
- Recommended minimum compression, preferably lossless compression such as PNG for best results

### Face Requirement

- Minimal face size required - 224 pixels
- The minimal distance between the eyes - 90 pixels
- Out of the plane rotation - 20 degrees
- In-plane rotation - 30 degrees
- Recommended not to obstruct the face with covid masks, glasses, by putting hand on your face etc.

### Threshold

The design threshold for the algorithm is 40%. Greater than 40% is live; less is a Spoof (Recommended around 40-45%).

## Sample Curl

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://preproduction.signzy.tech/api/v2/patrons/..patronID../passiveLiveness",
  "name": "Passive liveliness for Image",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "children": [],
        "description": "Contains the id parameter returned from the login step"
      },
      {
        "kind": "required",
        "name": "content-type",
        "type": "string",
        "children": [],
        "description": "application/json\n"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "task",
        "type": "string",
        "description": "task is checkLiveliness"
      },
      {
        "kind": "required",
        "name": "essentials",
        "type": "Object",
        "children": [
          {
            "kind": "required",
            "name": "image",
            "type": "string",
            "description": "URL of the image"
          }
        ],
        "description": "Essential part of the request"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "wHDxkHI6DiiF9ZR4XRJsE",
        "code": "{\n    \"task\": \"checkLiveness\",\n    \"essentials\": {\n        \"image\": \" \"\n    },\n    \"id\": \" \",\n    \"patronId\": \" \",\n    \"result\": {\n        \"liveness\": true,\n        \"score\": 0.98,\n        \"probability\": 0.98,\n        \"quality\": 1\n    }\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "wHDxkHI6DiiF9ZR4XRJsE"
  },
  "examples": {
    "languages": [
      {
        "id": "1QPb2Edqc1s27aFaEG4Da",
        "code": "curl --location --request POST 'https://preproduction.signzy.tech/api/v2/patrons/..patronId../passiveLiveness' \\\n\n\n--header 'Authorization: <token>' \\\n--header 'content-type: application/json' \\\n--data-raw '{\n    \"task\": \"checkLiveness\",\n    \"essentials\": {\n        \"image\": \"<Image>\"\n    }\n}'",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "UT82gkYYhQLg0v0wXtGw6",
        "code": "curl --location --request POST 'https://signzy.tech/api/v2/patrons/..patronId../passiveLiveness' \\\r\n--header 'Accept: */*' \\\r\n--header 'Accept-Language: en-US,en;q=0.8' \\\r\n--header 'Authorization: <token>' \\\r\n--header 'content-type: application/json' \\\r\n--data-raw '{\r\n    \"task\": \"checkLiveness\",\r\n    \"essentials\": {\r\n        \"image\": \"<Image>\"\r\n    }\r\n}'",
        "language": "curl",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "1QPb2Edqc1s27aFaEG4Da"
  },
  "description": "This API helps to verify liviness of a person on camera while Onboarding",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "passive-liveliness-for-image",
  "legacyHash": "mtZ35r9lEdZVJTj4BpcVJ"
}
```
:::

### Response Parameter

| PARAMETER NAME     | DESCRIPTION                                     |
| ------------------ | ----------------------------------------------- |
| task               | Task to be performed "checkLivliness"           |
| essentials         | Contains essentials input                       |
| essentials.image   | Contains Image Url                              |
| id                 | Unique id of the response                       |
| patronId           | Unique id of the user generated from login call |
| result             | Contains response data of the given Input       |
| result.liveness    | Whether the image is live or not                |
| result.score       | Score for image passive liveness                |
| result.probability | Probablity of being inaccurate                  |
| result.quality     | Score for quality of the image passed           |



:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](mailto\:help@signzy.com).
:::
