For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

/search/template/{collectionId}

Searches for a biometric template, extracted from a raw template, 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).

post
Authorizations
AuthorizationstringRequired

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.

Path parameters
collectionIdstring · min: 1Required

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.

Example: bank01_collection01Pattern: ^[A-Za-z0-9_-]+$
Body

Body for the POST request to search by template

facialTemplateRawstringRequired

An extended token that contains biometric templates and metadata. Storing it in databases is recommended because it remains valid across engine versions (it can be updated automatically if the extraction technology changes; see updatedTemplateRaw). Like the rest of the tokens, its value changes on every extraction (it carries a timestamp): two extractions of the same image do not give the same text, but they identify the same person. It is encoded in RFC4648 base64.

Example: QTevT1Lv5jr0rNyzS3u6SAscolMU+bHitq...
Responses
200

The result of the search, a list of template ids.

application/json

A list of specimens (faces) found in the database, sorted by descending similarity and with at most maxCandidates items.

galleryIndexintegerOptional

The position (0-based, unique within the response) that an item occupies in the collection gallery.

Example: 5
similaritynumberOptional

A value between 0 and 1 that indicates the similarity between two biometric templates.

Default: 0Example: 0.65
templateIdstringOptional

An identifier of a specimen (face) in the database.

Example: 6782225b-1793-4b68-a9de-8fdb3628c7e5
post/search/template/{collectionId}
POST /search/template/{collectionId} HTTP/1.1
Host: 127.0.0.1:6982/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 112

{
  "facialTemplateRaw": "QTevT1Lv5jr0rNyzS3u6SAscolMU+bHitq...",
  "options": {
    "maxCandidates": 5,
    "minSimilarity": 0.65
  }
}
[
  {
    "galleryIndex": 5,
    "similarity": 0.65,
    "templateId": "6782225b-1793-4b68-a9de-8fdb3628c7e5"
  }
]

Last updated