---
title: Face Smart Verification
slug: api-marketplace/face-smart-verification
description: Stay ahead of the game with our upcoming document featuring valuable information coming soon. Be prepared to access essential insights and stay tuned for its release in the near future. Subscribe now to be the first to receive this highly anticipated reso
createdAt: 2023-04-20T21:12:16.000Z
---

## Introduction

The Face Smart Verification API is a single, end‑to‑end solution that seamlessly combines high‑precision facial matching with real‑time passive liveness detection.&#x20;

By harnessing advanced face‑recognition algorithms alongside anti‑spoofing checks, this API not only compares two images—such as a selfie and an ID‑card photo—for match percentage, mask detection, and verification status, but also ensures that the user is a live person interacting with the camera, thwarting any presentation‑attack attempts.&#x20;

Designed for maximum security and user convenience, the Unified Identity Verification API delivers comprehensive, reliable identity proofing in one streamlined call.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/face/smart-verification
```
:::

:::CodeblockTabs
UAT/Testing Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/face/smart-verification
```
:::

***

### Request Headers

| **Name**      | **Value**        | **Required** | **Description**                                                                                            |
| ------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Request body parameters

| **Parameter**      | **Data Type** | **Description**                                                                                                                                                                                                                     | **Required** |
| ------------------ | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| livenessImage      | String        | Input image URL for Passive Liveliness Check                                                                                                                                                                                        | Mandatory    |
| faceMatchImage     | String        | Input image URL for Face Match Verification against the `livenessImage`                                                                                                                                                             | Mandatory    |
| livenessStrictMode | Boolean       | To enable strict mode for the model. The default value is `true` (strict mode enforces more robust checks for liveliness, rejecting cases where the face is not very clear based on the given  image requirements below)            | Optional     |
| faceMatchThreshold | Float         | The threshold value can be passed between **0.05** to **0.95**. **The default value is 0.5**.<br />If the image **match percentage is greater than or equal to threshold&#x20;**&#x74;hen the result would be true otherwise false. | Optional     |

:::CodeblockTabs
JSON

```json
{
    "livenessImage":"https://persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg", 
    "faceMatchImage": "https://preproduction-persist.signzy.tech/api/files/xxxx/download/xxxx.peg",
    "livenessStrictMode": true,
    "faceMatchThreshold": 0.7
}
```
:::

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api.signzy.app/api/v3/face/smart-verification' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Access-Token>' \
--data '{
    "livenessImage":"https://persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg", 
    "faceMatchImage": "https://preproduction-persist.signzy.tech/api/files/xxxx/download/xxxx.peg",
    "livenessStrictMode": true,
    "faceMatchThreshold": 0.7
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
    "livenessImage":"https://persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg", 
    "faceMatchImage": "https://preproduction-persist.signzy.tech/api/files/xxxx/download/xxxx.peg",
    "livenessStrictMode": true,
    "faceMatchThreshold": 0.7
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.signzy.app/api/v3/face/smart-verification',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<Access-Token>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("api.signzy.app")
payload = json.dumps({
    "livenessImage":"https://persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg", 
    "faceMatchImage": "https://preproduction-persist.signzy.tech/api/files/xxxx/download/xxxx.peg",
    "livenessStrictMode": true,
    "faceMatchThreshold": 0.7
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Access-Token>'
}
conn.request("POST", "/api/v3/face/smart-verification", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.signzy.app/api/v3/face/smart-verification"
  method := "POST"

  payload := strings.NewReader(`{
    "livenessImage":"https://persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg", 
    "faceatchImage": "https://preproduction-persist.signzy.tech/api/files/xxxx/download/xxxx.peg",
    "livenessStrictMode": true,
    "faceMatchThreshold": 0.7
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<Access-Token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter**    | **Data Type** | **Description**                                                                              |
| ---------------- | ------------- | -------------------------------------------------------------------------------------------- |
| result           | Object        | Contains the liveliness and face match result of the input images                            |
| result.liveness  | Object        | Contains the Passive Liveliness Results                                                      |
| result.facematch | Object        | Contains the  Face Match Results                                                             |
| result.message   | Object        | Contains any specific Message in case of any errors                                          |
| result.reason    | Object        | Contains the reason of the Execution of the API                                              |
| result.code      | Object        | Contains the Final Code upon execution of the API - Indicating  success / failure / timeouts |

:::CodeblockTabs
200

```json
{
    "result": {
        "input": {
            "livenessImage": "https://persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg",
            "faceMatchImage": "https://preproduction-persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg",
            "strict": true,
            "threshold": 0.7
        },
        "liveness": {
            "liveness": true,
            "score": 1,
            "probability": 1,
            "quality": 1
        },
        "match": {
            "verified": false,
            "message": "Verification completed with negative result",
            "matchPercentage": "2.00%",
            "maskDetections": []
        }
    },
    "message": "",
    "reason": "REQUEST_SUCCESSFUL",
    "code": "S001"
}
```

400

```json
// Invalid input in `faceMatchImage`
{
    "result": {
        "input": {
            "livenessImage": "https://persist.signzy.tech/api/files/xxxx/download/xxxx.jpeg",
            "faceMatchImage": "https://preproduction-persist.signzy.tech/api/files/xxxx/download/xxxx.jpg",
            "strict": true,
            "threshold": 0.7
        },
        "liveness": {},
        "match": {
            "message": "Error in downloading file",
            "name": "error",
            "status": 400,
            "reason": "Error",
            "type": "Bad Request",
            "statusCode": 400
        }
    },
    "message": "Error in downloading file",
    "reason": "BAD_REQUEST",
    "code": "E001"
}

// Face Not found for Passive Liveliness Check
{
    "result": {
        "liveness": {
            "message": "face not detected",
            "name": "error",
            "status": 400,
            "reason": "FACE_NOT_FOUND",
            "type": "Bad Request",
            "statusCode": 400
        },
        "faceMatch": {
            "verified": false,
            "message": "Verification completed with negative result",
            "matchPercentage": "0.00%"
        }
    },
    "message": "livenessError: face not detected, faceMatch: Successful",
    "reason": "REQUEST_SUCCESSFUL",
    "code": "S001"
}

// Multiple Faces Detected by Passive Liveliness Check
{
    "result": {
        "liveness": {
            "message": "Multiple faces found in one or both of the images.",
            "name": "error",
            "status": 400,
            "reason": "FACE_NOT_FOUND",
            "type": "Bad Request",
            "statusCode": 400
        },
        "faceMatch": {
            "verified": true,
            "message": "Verification completed with positive result",
            "matchPercentage": "100.00%"
        }
    },
    "message": "livenessError: Multiple faces found in one or both of the images., faceMatch: Successful",
    "reason": "REQUEST_SUCCESSFUL",
    "code": "S001"
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

***

### Document related constraints

:::hint{type="info"}
- The image should be clicked in a well-lit room, with the face shown clearly to the camera. Extreme darkness/brightness on the face might result in the API behaving unexpectedly.
- The complete face should be clearly visible in the image. Tilted faces might result in API behaving unexpectedly.
- Motion Blur might result in API behaving unexpectedly.
- **For Passive Liveliness Check:**
  - If strict=true is passed in the request then the strict liveliness check model will be used. To get the best results please follow the below-mentioned guidelines.
  - **The minimum size of the detected face should be 224X224 pixels for Passive Liveliness Check**
  - Any occlusions on parts of the face like Glasses and masks should be removed while performing a Liveness Check.
  - The detected Face should occupy at least 20% of the total image area.
  - The image should be clicked as a selfie (portrait mode only).
  - No image compression is highly recommended for accurate results.
  - For best results, please make sure the image you use fits tightly in the camera view and is horizontally aligned.
  - Don't pass the same URL in both the input images. it will throw a 400 error if the same URL is passed in both the first and second image.
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!
