REST API: persons

Create a person record

Add a person to a list from an image.

Purpose

Use this call to add a person to a list from a photo. The platform finds the faces on the image, applies the new_person_* rules, and creates a record for each face that passes. A face that matches a person already stored updates that person instead of creating a new one.

Request

POST <API_BASE_URL>/person/create. All calls are POST under your API address. Replace <API_BASE_URL> with the API address provided with your access.

Send a permanent API token in the token field of the body, or a user token in the token header. See authentication.

Content type: multipart/form-data. Send the fields as a multipart form. The image file goes in the form field image.

FieldTypeRequiredDescription
tokenstring (uuid)if no headerYour permanent API token. Required unless you send a user token in the token header.
list_idstring (uuid)noThe list the person is added to. When left out, the default list is used.
group_idstring (uuid)noThe data source group the image is attributed to.
source_idstring (uuid)noThe data source the image is attributed to.
fieldsarray of string or stringnoStrings stored with the record for your own business logic, for example your customer reference.
multibooleannoCreate a separate person for each face found. When false, only the largest face is processed.
new_person_thresholdvaluenoThe match threshold for creating a new person. The value never creates none; no_match uses the platform default.
new_person_square_minvaluenoThe smallest face side, in pixels, from which a person is created.
new_person_yaw_maxvaluenoThe largest left or right rotation, in degrees.
new_person_pitch_maxvaluenoThe largest up or down tilt, in degrees.
replace_on_foundbooleannoThe identifier of a person record to replace.
feature_checkarray of object or stringnoFeatures to detect on each face: a name or an array of names such as age, gender or quality.
thumbbooleannoReturn a pre-processed crop of each face, base64 encoded.
drop_imagebooleannoDo not store the image in the actions history.
embeddingstringnoA vector representation of a face. Send it to create a person from a vector instead of from an image.

Response

HTTP 201. At least one person record was created.

FieldTypeDescription
statusstringAlways ok on this body.
messagestringWhat the recognition step concluded. Never branch on it.
persons_newarray of object or objectThe records created by this call. Each has the fields of get person.
persons_updatedarray of objectExisting records the image was added to, one per face that matched a stored person.
faces_totalintegerHow many faces were found on the image.
matchesarray of objectThe hits of every found face against the person lists. Empty when nothing matched.
spentintegerProcessing time in milliseconds.

HTTP 200. No new record: every face on the image matched a person already stored, so only persons_updated is filled.

Errors

  • 400: The body failed validation. The answer has status of error and a details list with one entry per offending field (path, expected, actual).
  • 401: The token is missing, expired or unknown.

A refusal can also come before the operation runs: an address outside your IP allowlist, a token bound to another address, or a body that is not valid JSON. See response format and errors.

Example

Request:

curl -X POST "<API_BASE_URL>/person/create" \
  -F "token=<your permanent API token>" \
  -F "list_id=<person list id>" \
  -F "fields=<your reference>" \
  -F "image=@photo.jpg"

Response:

{
  "status": "ok",
  "message": "<detail>",
  "persons_new": [
    {
      "person_id": "<person id>",
      "list_id": "<person list id>",
      "created": "2026-01-01T10:00:00.000Z",
      "updated": "2026-01-01T10:00:00.000Z",
      "fields": [
        "<your reference>"
      ],
      "group_id": "<group id>",
      "source_id": "<source id>",
      "features": [],
      "status": "init",
      "yaw": 4,
      "thumbs": [],
      "embeddings": []
    }
  ],
  "persons_updated": [],
  "faces_total": 1,
  "matches": [],
  "spent": 540
}

Questions about the face API?

Write to us and we will help.

Talk to us