# Selfie Verification

The Selfie Verification API, also known as the Liveness API, verifies if a user's selfie has been captured by a live individual at the time of verification, indicating no fraudulent impersonation attempt.

It also has additional response fields to suit your business requirements.

## Selfie Validation

`POST` `https://secctrl.tutelar.io/api/v1/kyc/vision/selfie_validation`

### Post parameters description is given below

| Post Parameter | Type   | Is Mandatory | Description                       |
| -------------- | ------ | ------------ | --------------------------------- |
| selfie         | String | Yes          | Selfie Image Url or Base64 String |

### Sample Post Parameters

```json
{
  "selfie": "Image URL/Base64 String"
}
```

## Responses

### 200: Success Response

```json
{
  "success": true,
  "code": 200,
  "message": "The request has been successfully completed.",
  "reference_id": "10d7654f-b552-48b3-b75e-06cd4a967878",
  "status": "completed",
  "result": {
    "details": {
      "liveFace": {
        "value": "yes",
        "confidence": "high",
        "score": 100
      },
      "qualityChecks": {
        "multipleFaces": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "eyewear": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "readingGlasses": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "sunglasses": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "faceOccluded": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "headTurned": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "bright": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "dull": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "blur": {
          "value": "no",
          "score": 95,
          "confidence": "high"
        },
        "eyesClosed": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "nonWhiteBackground": {
          "value": "yes",
          "score": 98,
          "confidence": "high"
        },
        "hat": {
          "value": "no",
          "score": 99,
          "confidence": "high"
        },
        "nudity": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        },
        "maskPresent": {
          "value": "no",
          "score": 0,
          "confidence": "high"
        }
      }
    },
    "inputImageUrls": {
      "image": ""
    },
    "summary": {
      "action": "pass",
      "details": []
    }
  },
  "requested_at": "2024-10-01T07:01:18.335Z",
  "completed_at": "2024-10-01T07:01:19.431Z"
}
```

### 400: Validation Error Response

```json
{
  "success": false,
  "code": 400,
  "message": "Invalid input. Please check your request and try again.",
  "error": {
    "message": "Selfie image should not be empty",
    "field": "selfie",
    "code": "BAD_REQUEST"
  }
}
```

### 200: Failure Response

```json
{
  "success": true,
  "code": 200,
  "message": "The request could not be completed due to an error.",
  "reference_id": "76d049e8-e9eb-4095-8926-74235763cf8a",
  "status": "failed",
  "error": {
    "message": "Verification Failed.",
    "code": "ERROR"
  },
  "requested_at": "2024-03-18T05:12:26.884Z",
  "completed_at": "2024-03-18T05:12:27.305Z"
}
```


---

# 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.v2.tutelar.io/selfie-verification.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.
