Vectors

Description

The method compares biometric (photo) vectors with vectors of persons from the specified lists. A JWT token must be provided in the request header.

Request format

  • HTTP method: POST
  • URL: /vector/search
  • Content-Type: application/json
  • Authorization: required

Request parameters

ParameterTypeWhere passedRequiredDescription
tokenstringHeaderUser JWT token

Request body (JSON)

FieldTypeRequiredDescription
tokenstringUser JWT token
embeddingsstringBiometric vector (or vector string)
list_idsstringIdentifier(s) of the person lists to search in
thresholdstringMatch threshold
person_databooleanWhether to return found person data
resultsstringResult format (e.g., «all», «top»)

Example request (cURL)

curl -X POST "https://api.enface.ai/vector/search" 
  -H "Content-Type: application/json" 
  -H "Authorization: Bearer jwt.temporary.token" 
  -d '{
    "token": "jwt.temporary.token",
    "embeddings": "0.123,0.456,0.789",
    "list_ids": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "threshold": "0.7",
    "person_data": true,
    "results": "top"
  }'

Response examples

Success (200 OK)
{
  "results": [
    {
      "additionalProp1": {}
    }
  ],
  "status": "ok"
}
Error (400 Invalid input)
{
  "message": "invalid input",
  "status": "error"
}