# Face Comparison

### Compare two faces

## Compare two images

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

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                        |
| ---------------------------------------- | ------ | ---------------------------------- |
| image1<mark style="color:red;">\*</mark> | string | Image that needs to be recognized. |
| image2<mark style="color:red;">\*</mark> | string | Image that needs to be recognized. |

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

```javascript
{
    "message":"The images you uploaded are the same person",
    "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="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: 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-comparison.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.
