> For the complete documentation index, see [llms.txt](https://docs.usetani.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usetani.ai/face/face-recognition.md).

# Face Recognition

### Fetch user with their face

{% hint style="info" %}
**Good to know**: Only users that have been registered as part of your group would be queried during this request. The user with the highest comparable features as the image provided would be returned along with the similarity percentage.
{% endhint %}

## Search for similar faces

<mark style="color:green;">`POST`</mark> `https://api.usetani.com/api/v0/persons/authenticate`

Creates a new person.

#### Headers

| Name                                         | Type   | Description                       |
| -------------------------------------------- | ------ | --------------------------------- |
| x-api-key<mark style="color:red;">\*</mark>  | string | Your API key                      |
| x-group-id<mark style="color:red;">\*</mark> | string | Your group ID from the dashboard. |

#### Request Body

| Name                                    | Type   | Description                        |
| --------------------------------------- | ------ | ---------------------------------- |
| image<mark style="color:red;">\*</mark> | string | Image that needs to be recognized. |

{% tabs %}
{% tab title="200 Search successful" %}

```javascript
{
    "message":"We found a match for the uploaded image",
    "potential_match": {
        "person_id": "string",
        "person_name": "string",
        "client_id": "string",
    },
    "similarity_score": 0.7556397799150376,
}
```

{% endtab %}

{% tab title="401 Unauthorized" %}

```javascript
{
    "detail": "API key/Group Id is missing"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Server error" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```javascript
{
    "detail": "We could not find a match for the uploaded image"
}
```

{% endtab %}

{% tab title="400: Bad Request No faces found" %}

```javascript
{
    "detail": "No Faces Detected in one or both images. Kindly take a clearer picture and try again"
}
```

{% endtab %}
{% endtabs %}
