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
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())
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"}
}'