> 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-registration.md).

# Face Registration

### Create a person

{% hint style="info" %}
**Good to know:** This API method allows your business to register a user and save their image with a unique identifier. The identifier would be used as a reference when making face recognition requests.
{% endhint %}

## Create person

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

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                               |
| ---------------------------------------------- | ------ | ----------------------------------------- |
| person\_name<mark style="color:red;">\*</mark> | string | The name of the person                    |
| client\_id<mark style="color:red;">\*</mark>   | string | The unique ID of your user for reference. |

{% tabs %}
{% tab title="200 Person created successfully" %}

```javascript
{
    "message":"Person created successfully",
    "person_details": {
        "person_id": "string",
        "person_name": "string",
        "client_id": "string",
    }
}
```

{% 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 Identifier already exists with a different person." %}

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

{% endtab %}
{% endtabs %}

### Add an image to identify a person

{% hint style="info" %}
**Good to know:** This request collects the image provided and stores the vector representation in our database.
{% endhint %}

{% openapi src="/files/LsJMHsWopaSMT4jae66n" path="/api/v0/persons/{person\_id}/image" method="post" %}
[openapi.json](https://2859929210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1C26PzSGR6yq7v6pwwhm%2Fuploads%2FuVV8w145XvUmIouwmSzZ%2Fopenapi.json?alt=media\&token=343e23d4-3056-4baf-80ff-6a011d2a4a09)
{% endopenapi %}
