Create fusion vector and save additional images

Description

The method creates a fusion vector (combined vector representation) for a person and allows saving additional images or data. A JWT token in the header or request body is required for access.

Request format

  • HTTP method: POST
  • URL: /person/fusion
  • Content-Type: multipart/form-data
  • Authorization: required

Request parameters

ParameterTypeWhere passedRequiredDescription
tokenstringHeader, form-data✅*Permanent user token. If the temporary token is not specified in the «token» header, this parameter is required in the request body
list_idstringform-dataIdentifier of the person list
person_idstringform-dataIdentifier of the person
replace_person_idstringform-dataID of the person to replace
embeddingsarrayform-dataVector representation of the face
new_person_thresholdstring/numberform-dataThreshold for a new face match
fieldsarrayform-dataBusiness fields for the record
  • One of the token transfer options is required.

Example request (cURL)

curl -X POST "https://api.enface.ai/person/fusion" 
  -H "Authorization: Bearer jwt.temporary.token" 
  -F "list_id=3fa85f64-5717-4562-b3fc-2c963f66afa6" 
  -F "person_id=75e55780-8943-11ea-9773-e96daa282099" 
  -F "fields=John" 
  -F "fields=Doe" 
  -F "embeddings=0.123,0.456,0.789"

Response examples

Success (200 OK)
{
  "status": "ok"
}
Error (400 Bad Request)
{
  "message": "invalid schema",
  "status": "error"
}
Error (401 Unauthorized)
{
  "message": "access denied",
  "status": "error"
}
Error (404 Not Found)
{
  "message": "item with this id does not found",
  "status": "error"
}