> ## Documentation Index
> Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Face Recognition API

> Recognizing a face in an image is a more advanced feature than just detecting the face in the image.

**Face Recognition API**

Recognizing a face in an image is a more advanced feature than just detecting the face in the image.

## Endpoint

`POST /v3/universal-ai` (sync)

Model string pattern: `image/face_recognition/{provider}[/{model}]`

## Input

| Field | Type | Required | Description |
| - | - | - | - |
| collection\_id | uuid | Yes | Collection id from POST /v3/universal-ai/collections. The provider in the model string must match the collection's provider. |
| file | file\_input | Yes | Image file ID from /v3/upload or direct file URL |

## Output

| Field | Type | Required | Description |
| - | - | - | - |
| **items** | array\[object] | No | |
|     confidence | float | Yes | |
|     face\_id | string | Yes | |

## Available Providers

| Provider | Model String | Price |
| - | - | - |
| amazon | `image/face_recognition/amazon` | \$1 per 1,000 files |
| facepp | `image/face_recognition/facepp` | \$2 per 1,000 requests |

## Quick Start

```python Python theme={null}
import requests

url = "https://api.edenai.run/v3/universal-ai"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

payload = {
    "model": "image/face_recognition/amazon",
    "input": {
        "collection_id": "value",
        "file": "YOUR_FILE_UUID_OR_URL"
    }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

```bash cURL theme={null}
curl -X POST https://api.edenai.run/v3/universal-ai \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "image/face_recognition/amazon",
    "input": {"collection_id": "value", "file": "YOUR_FILE_UUID_OR_URL"}
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.