> For the complete documentation index, see [llms.txt](https://api-old.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-old.innov8tif.com/okayface/face-verification/version-1.md).

# Version 1

## Insert Face Into Database

<mark style="color:green;">`POST`</mark> `http://okaydocdev.innov8tif.com/ekyc/api/innov-face/facequery/insert`

#### Request Body

| Name        | Type   | Description                                                                                                          |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| userName    | string | Image name.                                                                                                          |
| groupName   | string | Image group name.                                                                                                    |
| imageFile   | object | Image object. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used.                   |
| imageBase64 | string | Image in base64 encoded string. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used. |
| apiKey      | string | To be assigned by Innov8tif.                                                                                         |

{% tabs %}
{% tab title="200 groupStatus indicates group existence in the database. (EXISTING/NEW)" %}

```
{
    "status": "success",
    "groupName": "celebrity",
    "groupStatus": "EXISTING",
    "name": "tom"
}
```

{% endtab %}
{% endtabs %}

### Example Input&#x20;

![](/files/-M5doUkdgHBgj1k2Anqh)

## Match Faces In Database

<mark style="color:green;">`POST`</mark> `http://okaydocdev.innov8tif.com/ekyc/api/innov-face/query`

#### Request Body

| Name        | Type   | Description                                                                                                          |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| groupName   | string | Image group to be matched with.                                                                                      |
| imageFile   | object | Image object. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used.                   |
| imageBase64 | string | Image in base64 encoded string. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used. |
| apiKey      | string | To be assigned by Innov8tif.                                                                                         |

{% tabs %}
{% tab title="200 Image was found in the group" %}

```
{
    "status": "success",
    "resultFound": true,
    "groupFound": true,
    "name": "tom",
    "score": 1.0
}
```

{% endtab %}

{% tab title="302 Group exists but cannot find similar face" %}

```
{
    "status": "success",
    "resultFound": false,
    "groupFound": true
}
```

{% endtab %}

{% tab title="304 Group does not exist." %}

```
{
    "status": "success",
    "resultFound": false,
    "groupFound": false
}
```

{% endtab %}
{% endtabs %}

### Example Input

![](/files/-M5duEOBKo6o0-cXIpg_)

{% file src="/files/-M5dudSCaOVVs7-f7Y9K" %}
Face Verification
{% endfile %}
