#
Face Recognition API
#
Overview
The Face Recognition API provides AI-powered face recognition and management capabilities for building secure identity verification systems.
The Face Recognition API enables you to:
- Search for matching faces in your collections
- Index new faces to collections for future recognition
- Automatically search and index if not found (duplicate detection)
- Delete faces from collections
- Manage face recognition collections (create, retrieve, update, delete)
- Utilize high-accuracy AI models with configurable match thresholds
#
Base URLs
#
API Endpoints
#
Get Collection
Retrieves a single collection by its identifier.
Endpoint: GET /v1/collection/get
Authentication: API Key or Bearer Token
Query Parameters:
Response Example:
{
"recognitionCollection": {
"collectionId": "my-collection",
"description": "Collection for employee verification",
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-02-10T14:20:00Z"
}
}
Response Fields:
Example Request:
curl -X GET "https://face-recognition-api-eu.realeyes.ai/v1/collection/get?collectionId=my-collection" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE"
Response Codes:
200- Collection found400- Validation failure401- Authentication failure404- Collection not found
#
Get All Collections
Lists all collections belonging to the authenticated account.
Endpoint: GET /v1/collection/get-all
Authentication: API Key or Bearer Token
Response Example:
{
"collections": [
{
"collectionId": "my-collection",
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-02-10T14:20:00Z"
},
{
"collectionId": "employee-faces",
"createdAt": "2026-01-20T08:15:00Z",
"updatedAt": "2026-01-20T08:15:00Z"
}
]
}
Response Fields:
Example Request:
curl -X GET "https://face-recognition-api-eu.realeyes.ai/v1/collection/get-all" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE"
Response Codes:
200- Collections returned400- Validation failure401- Authentication failure
#
Create Collection
Creates a new recognition collection.
Endpoint: POST /v1/collection/create
Authentication: API Key or Bearer Token
Request Body:
{
"collectionId": "new-collection",
"description": "Collection for customer verification"
}
Request Parameters:
Response Example:
{
"collectionId": "new-collection"
}
Response Fields:
Example Request:
curl -X POST "https://face-recognition-api-eu.realeyes.ai/v1/collection/create" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE" \
-H "Content-Type: application/json" \
-d '{
"collectionId": "new-collection",
"description": "Collection for customer verification"
}'
Response Codes:
200- Collection created successfully400- Validation failure401- Authentication failure409- Collection already exists
#
Update Collection
Updates an existing collection (only description is mutable).
Endpoint: PUT /v1/collection/update
Authentication: API Key or Bearer Token
Request Body:
{
"collectionId": "my-collection",
"description": "Updated description for my collection"
}
Request Parameters:
Response Example:
{
"collectionId": "my-collection"
}
Response Fields:
Example Request:
curl -X PUT "https://face-recognition-api-eu.realeyes.ai/v1/collection/update" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE" \
-H "Content-Type: application/json" \
-d '{
"collectionId": "my-collection",
"description": "Updated description for my collection"
}'
Response Codes:
200- Collection updated400- Validation failure401- Authentication failure
#
Delete Collection
Deletes a collection by its identifier.
Endpoint: DELETE /v1/collection/delete
Authentication: API Key or Bearer Token
Query Parameters:
Response Example:
{}
Example Request:
curl -X DELETE "https://face-recognition-api-eu.realeyes.ai/v1/collection/delete?collectionId=my-collection" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE"
Response Codes:
200- Collection deleted (idempotent)400- Validation failure401- Authentication failure
#
Search Face
Search for a face in a specified collection. Returns the face ID if a match is found. The faces on the images should be in an upright position. Sideways or upside-down faces are not supported.
Endpoint: POST /v1/face/search
Authentication: API Key or Bearer Token
Request Body:
{
"image": {
"bytes": "base64-encoded-image-string",
"url": null
},
"collectionId": "my-collection",
"faceMatchThreshold": 80
}
Request Parameters:
Response Example:
{
"face": {
"confidence": 0.9987,
"boundingBox": {
"x": 120,
"y": 80,
"width": 200,
"height": 250
}
},
"faceId": "face_abc123xyz789",
"hasFace": true,
"unprocessedFaceCount": 0
}
Response Fields:
Example Request:
curl -X POST "https://face-recognition-api-eu.realeyes.ai/v1/face/search" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE" \
-H "Content-Type: application/json" \
-d '{
"image": {
"bytes": "/9j/4AAQSkZJRgABAQEAYABgAAD..."
},
"collectionId": "my-collection",
"faceMatchThreshold": 80
}'
Response Codes:
200- OK400- Bad Request401- Unauthorized404- Not Found
#
Index Face
Index a new face into a specified collection. Returns the generated face ID. The faces on the images should be in an upright position. Sideways or upside-down faces are not supported.
Endpoint: POST /v1/face/index
Authentication: API Key or Bearer Token
Request Body:
{
"image": {
"bytes": "base64-encoded-image-string",
"url": null
},
"collectionId": "my-collection"
}
Request Parameters:
Response Example:
{
"face": {
"confidence": 0.9987,
"boundingBox": {
"x": 120,
"y": 80,
"width": 200,
"height": 250
}
},
"faceId": "face_new456def012",
"hasFace": true,
"unprocessedFaceCount": 0
}
Response Fields:
Example Request:
curl -X POST "https://face-recognition-api-eu.realeyes.ai/v1/face/index" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE" \
-H "Content-Type: application/json" \
-d '{
"image": {
"bytes": "/9j/4AAQSkZJRgABAQEAYABgAAD..."
},
"collectionId": "my-collection"
}'
Response Codes:
200- OK400- Bad Request401- Unauthorized404- Not Found
#
Search or Index Face
Search for a face within a collection or index the face if not found. Useful for duplicate detection. The faces on the images should be in an upright position. Sideways or upside-down faces are not supported.
Endpoint: POST /v1/face/search-or-index
Authentication: API Key or Bearer Token
Request Body:
{
"image": {
"bytes": "base64-encoded-image-string",
"url": null
},
"collectionId": "my-collection",
"faceMatchThreshold": 80
}
Request Parameters:
Response Example:
{
"face": {
"confidence": 0.9987,
"boundingBox": {
"x": 120,
"y": 80,
"width": 200,
"height": 250
}
},
"faceId": "face_abc123xyz789",
"hasFace": true,
"unprocessedFaceCount": 0,
"resultSource": "Search"
}
Response Fields:
Example Request:
curl -X POST "https://face-recognition-api-eu.realeyes.ai/v1/face/search-or-index" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE" \
-H "Content-Type: application/json" \
-d '{
"image": {
"bytes": "/9j/4AAQSkZJRgABAQEAYABgAAD..."
},
"collectionId": "my-collection",
"faceMatchThreshold": 80
}'
Response Codes:
200- OK400- Bad Request401- Unauthorized404- Not Found
#
Delete Face
Delete a face from the specified collection. The faces on the images should be in an upright position. Sideways or upside-down faces are not supported.
Endpoint: DELETE /v1/face/delete
Authentication: API Key or Bearer Token
Query Parameters:
Response Example:
{}
Example Request:
curl -X DELETE "https://face-recognition-api-eu.realeyes.ai/v1/face/delete?collectionId=my-collection&faceId=face_abc123xyz789" \
-H "Authorization: ApiKey API-KEY-FROM-DEV-CONSOLE"
Response Codes:
200- OK400- Bad Request401- Unauthorized404- Not Found
#
Health Check
Check the API health status.
Endpoint: GET /v1/healthz
Authentication: None required
Response Example:
2026-02-16T10:30:45Z
Response Fields:
Example Request:
curl -X GET "https://face-recognition-api-eu.realeyes.ai/v1/healthz"
Response Codes:
200- API is healthy
#
Common Response Codes
#
Swagger Documentation
Interactive API documentation is available via Swagger UI:
- EU: https://face-recognition-api-eu.realeyes.ai/swagger
- US: https://face-recognition-api-us.realeyes.ai/swagger
Last updated: 2026-02-16