> 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.usetani.ai/face/face-recognition.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.
