For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Pular para o conteúdo

/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).

post
Autorizações
AuthorizationstringObrigatório

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.

Parâmetros de rota
collectionIdstring · mín: 1Obrigatório

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_-]+$
Corpo

Body for the POST request to search by image

imagestringObrigatório

Image buffer in JPEG, PNG or BMP format, encoded in RFC4648 base64.

Example: /9j/4Rf+RXhpZgAASUkqAAgA...
Respostas
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.

galleryIndexintegerOpcional

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

Example: 5
similaritynumberOpcional

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

Default: 0Example: 0.65
templateIdstringOpcional

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

Example: 6782225b-1793-4b68-a9de-8fdb3628c7e5
post/search/image/{collectionId}
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