An API for face recognition and vector comparison services
https://api.faceping.ai
FacePing's API provides a comprehensive set of endpoints for face recognition and vector management. Key functionalities include face comparisons (both image-to-image and vector-to-vector) and generating face vectors from uploaded images.
You can also efficiently manage face vector data with group-level operations, such as creating, deleting, and listing groups, as well as retrieving or removing specific vectors.
Advanced search capabilities
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
Face1
First face to compare
Face2
Second face to compare
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
embedding1
First face embedding vector as comma-separated float values
embedding2
Second face embedding vector as comma-separated float values
1
{
"embedding1": "0.021,0.345,0.567,...",
"embedding2": "0.019,0.341,0.569,..."
}
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
image
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
Unnamed Property
1
[
"a7b2526a-05ec-4e44-9c7c-c6e3f6a8adca",
"6ba03120-651f-4bb8-a1b1-6fd5ad0a00ab",
"a60b23c0-25ac-4815-a46b-f5e15f6e19a6"
]
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
vectorId
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
metadata
Dictionary of metadata key-value pairs to search for. Each pair acts as a filter condition where all conditions must match.
1
{
"metadata": {
"department": "Important Department"
}
}
Request:
This endpoint expects a multipart/form-data
request.
Example cURL:
curl -X POST "/groups/my-face-group/face?metadata[key1]=value1&metadata[key2]=value2" -H "Content-Type: multipart/form-data" -F "image=@path/to/your-image.jpg"
Here:
my-face-group
with the desired group name.metadata
parameters are added as query parameters. For example ?metadata[role]=admin
.image
is the file form field containing the face image (JPEG, PNG, etc.).Example Response:
{ "id": "123e4567-e89b-12d3-a456-426614174000", "groupName": "my-face-group" }
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
metadata
groupName
image
1
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
vectorString
Vector embedding as comma-separated float values
metadata
Optional metadata associated with the vector Example: {"name": "John", "timestamp": "2024-03-21"}
1
{
"vectorString": "0.1,0.2,0.3,0.4",
"metadata": {
"description": "Some sample metadata"
}
}
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
base64Image
Base64 encoded image string. Can include data URL prefix (e.g., "data:image/jpeg;base64,"). Maximum decoded size: 1MB.
metadata
Optional metadata to store with the face vector. These key-value pairs will be combined with system metadata (source, createdAt).
1
{
"base64Image": "iVBORw0KGgoAAAANSUhEUgAAAQAA....",
"metadata": {
"description": "Some sample metadata"
}
}
Request:
This endpoint expects a multipart/form-data
request containing an image file.
Example cURL:
curl -X POST "/groups/my-face-group/faces/search?topK=5" \ -H "Content-Type: multipart/form-data" \ -F "queryImage=@path/to/query-image.jpg"
Response Example:
The response is a list of scored vectors:
[ { "id": "123e4567-e89b-12d3-a456-426614174000", "score": 0.95, "metadata": { "fileName": "face1.jpg", "tag": "personA" } }, { "id": "223e4567-e89b-12d3-a456-426614174000", "score": 0.90, "metadata": { "fileName": "face2.jpg", "tag": "personB" } } ]
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
topK
groupName
queryImage
1
Request (JSON):
{ "vectorString": "0.1,0.2,0.3,0.4", "topK": 5 }
Example Response:
[ { "id": "123e4567-e89b-12d3-a456-426614174000", "score": 0.95, "metadata": { "fileName": "face1.jpg", "tag": "personA" } } ]
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
vectorString
Query vector as comma-separated float values to search against
topK
Maximum number of similar vectors to return Default: 10
1
{
"vectorString": "0.1,0.2,0.3,0.4",
"topK": 5
}
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
vectors
Collection of vector embeddings to store, each with (optional) metadata.
1
{
"vectors": [
{
"vectorString": "0.11,0.22,0.33,0.44",
"metadata": {
"tag": "personA"
}
},
{
"vectorString": "0.15,0.25,0.35,0.45"
}
]
}
After Processing Completion:
This operation processes images from a specified Google Drive folder. Once completed:
Callback URL (if provided):
A POST request will be sent to the provided callback URL with a JSON payload summarizing the process result.
Example:
{ "totalFiles": 50, "successCount": 48, "failed": [ { "fileName": "corrupted_image.jpg", "fileId": "abc123", "error": "Invalid image format." } ] }
Email Notification (if email is provided):
An email summarizing the results (total files processed, how many succeeded, how many failed) will be sent to the specified email address.
This email contains the same information as the callback payload, presented in a readable format.
What to Expect:
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
folderId
Google Drive folder ID to process images from
serviceAccountKey
JSON string containing Google service account credentials
notificationEmailAddress
Email address to receive processing status notifications and results. If provided, notifications will be sent upon completion or failure.
callbackUrl
Webhook URL for receiving real-time processing status updates. When specified, the system will send HTTP POST requests with processing status and results.
1
{
"folderId": "1A2B3C_DemoFolderId",
"serviceAccountKey": "{ \"type\": \"service_account\", ... }",
"notificationEmailAddress": "[email protected]",
"callbackUrl": ""
}
After Processing Completion:
This operation processes images from a specified FTP folder. Once completed:
Callback URL (if provided):
A POST request will be sent to your callback URL with a JSON summary of the process:
{ "totalFiles": 30, "successCount": 28, "failed": [ { "fileName": "bad_image.png", "fileId": "/ftp/path/bad_image.png", "error": "Unable to generate embedding." } ] }
Email Notification (if email is provided):
An email will be sent to the provided email address summarizing the result of the FTP image processing.
It includes the total number of files processed, how many succeeded, and the details of any failures.
What to Expect:
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
groupName
host
FTP server hostname or IP address
username
FTP account username. Special characters should be URL encoded (e.g., $ as %24)
password
FTP account password
folderPath
Path to the folder containing images on the FTP server
port
Optional port number, defaults to 21 if not specified
notificationEmailAddress
Email address to receive processing status notifications and results. If provided, notifications will be sent upon completion or failure.
callbackUrl
Webhook URL for receiving real-time processing status updates. When specified, the system will send HTTP POST requests with processing status and results.
1
{
"host": "ftp://example.com",
"username": "ftpuser",
"password": "ftppass",
"folderPath": "/images/",
"port": 21,
"notificationEmailAddress": "[email protected]",
"callbackUrl": ""
}