/search/image/{collectionId}
Searches for a biometric template, extracted from a raw image, among the specimens (faces) stored in the database, under the same collectionId. The collectionId must correspond to an existing collection; if the collection exists but has no specimens, an empty list is returned (it is not an error). Without options, a single candidate is returned (maxCandidates = 1) and without filtering by similarity (minSimilarity = 0).
JWT signed with HS256 (shared secret auth_jwt_secret) and with a non-expired exp claim; if it includes nbf, it must be currently valid. Only applied if auth_enabled is true and auth_accept_authorization_header is true. The Bearer scheme is case-insensitive.
An identifier that allows grouping different images or biometric templates in a common space. It can only contain ASCII letters (A-Z, a-z), digits (0-9), underscore (_) and hyphen (-); it cannot be empty and it is case-sensitive. The following are not allowed: spaces, dots, +, :, @, quotes, %, ~, /, or non-ASCII characters (ñ, accents, emoji...): the identifier is used as a path parameter and any other character prevents its use. It must correspond to a collection previously created with POST /collections.
bank01_collection01Pattern: ^[A-Za-z0-9_-]+$Body for the POST request to search by image
Image buffer in JPEG, PNG or BMP format, encoded in RFC4648 base64.
/9j/4Rf+RXhpZgAASUkqAAgA...The result of the search, a list of template ids.
A list of specimens (faces) found in the database, sorted by descending similarity and with at most maxCandidates items.
The position (0-based, unique within the response) that an item occupies in the collection gallery.
5A value between 0 and 1 that indicates the similarity between two biometric templates.
0Example: 0.65An identifier of a specimen (face) in the database.
6782225b-1793-4b68-a9de-8fdb3628c7e5Incorrect parameters arrive in the request.
JWT authentication is enabled and the token is missing or invalid.
The request body exceeds client_max_body_size. It is returned with no body and the connection is closed.
An error occurred in the Backend1N service.
POST /search/image/{collectionId} HTTP/1.1
Host: 127.0.0.1:6982/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 90
{
"image": "/9j/4Rf+RXhpZgAASUkqAAgA...",
"options": {
"maxCandidates": 5,
"minSimilarity": 0.65
}
}[
{
"galleryIndex": 5,
"similarity": 0.65,
"templateId": "6782225b-1793-4b68-a9de-8fdb3628c7e5"
}
]Atualizado