Objects
Add a face object
To add a new face object to a record of individuals, use the following method:
POST /objects/faces/
The added object contains a source photo, thumbnail, and other attributes.
Tip
To add a new body object to a record of individuals, use
/objects/bodies/
instead of/objects/faces/
.To add a new vehicle object to a vehicle record, use
/objects/cars/
instead of/objects/faces/
.
The REQUEST BODY is required and contains multipart/form-data with the following parameters:
Name |
Type |
Description |
---|---|---|
|
string |
Can contain one of the following reference expressions that identify a source object from which a new object will be created:
Valid expressions for each method:
|
|
string |
Auxiliary parameter. |
|
enum |
Defines the default behavior to apply when multiple objects are detected in the source image provided via the Default: Allowed values:
|
|
integer |
ID of a list of records grouped into a single batch upload. Service parameter used only by the frontend. |
|
binary |
Source image. Required parameter if the |
|
integer |
X-coordinate (in pixels) of the top-left corner of the object’s bounding box. |
|
integer |
Y-coordinate (in pixels) of the top-left corner of the object’s bounding box. |
|
integer |
X-coordinate (in pixels) of the bottom-right corner of the object’s bounding box. |
|
integer |
Y-coordinate (in pixels) of the bottom-right corner of the object’s bounding box. |
|
boolean |
If Default: |
|
integer |
ID of the record that will store the added object. Required parameter. |
CURL example
curl -X POST "http://<findface-ip:port>/objects/faces/" \
-H "Authorization: Token <token>" \
-H "Content-Type: multipart/form-data" \
-F "create_from=detection:d1svumckd5qs72mq52b0" \
-F "source_photo=@sample_face.jpg" \
-F "card=1"
Tip
Replace sample_face.jpg
with the full path if the file is not in your current working directory.
Example: "source_photo=@/home/ubuntu/sample_face.jpg"
For example, to add a new face object, follow these steps:
Use the
POST /detect
method to detect a face in a photo and copy theid
of the detected face.- Send the
POST /objects/faces/
request with the following parameters:create_from
: specify theid
from step 1 in the following format:detection:<detection_id>
.source_photo
: provide the same image that was used in thePOST /detect
request.card
: specify the ID of the record to which the new face object will be added.
If the response is successful (Created: 201), it returns a JSON object that contains the following parameters. Example.
Note
* – means required parameters. 🆁 – read only.
Name |
Type |
Description |
---|---|---|
|
integer |
Record ID. |
|
date-time 🆁 |
Timestamp indicating when the object was created. |
|
date-time 🆁 |
Timestamp indicating when the object was last updated. |
|
string 🆁 |
Filename of the source image used to create the object. |
|
uri |
URL of the source image file, whose name is specified in the |
|
uri 🆁 |
URL of the object’s thumbnail image. |
|
integer |
X-coordinate (in pixels) of the top-left corner of the object’s bounding box. |
|
integer |
Y-coordinate (in pixels) of the top-left corner of the object’s bounding box. |
|
integer |
X-coordinate (in pixels) of the bottom-right corner of the object’s bounding box. |
|
integer |
Y-coordinate (in pixels) of the bottom-right corner of the object’s bounding box. |
|
boolean |
Default: |
|
object |
Contains additional data as key-value pairs. Keys are arbitrary, and values can be strings, integers, floats, booleans, objects, arrays, or null. |
|
string 🆁 |
ID of the added object. |
|
object |
Metadata. |
Response example
{
"card": 3,
"created_date": "2025-06-09T16:00:12+00:00",
"modified_date": "2025-06-09T16:00:12+00:00",
"source_photo_name": "face1.jpg",
"source_photo": "http://<findface-ip:port>/uploads/cards/Ad/3/face_face1_YB9Eep.jpg",
"thumbnail": "http://<findface-ip:port>/uploads/cards/G0/3/face_face1_thumbnail_RNeQrf.jpg",
"frame_coords_left": 722,
"frame_coords_top": 31,
"frame_coords_right": 801,
"frame_coords_bottom": 132,
"active": true,
"features": {},
"id": "4696237533220385428",
"meta": {}
}
Useful requests
GET /objects/bodies/
POST /objects/bodies/
GET /objects/bodies/{id}/
DELETE /objects/bodies/{id}/
PATCH /objects/bodies/{id}/
GET /objects/cars/
POST /objects/cars/
GET /objects/cars/{id}/
DELETE /objects/cars/{id}/
PATCH /objects/cars/{id}/
GET /objects/faces/
POST /objects/faces/
GET /objects/faces/{id}/
DELETE /objects/faces/{id}/
PATCH /objects/faces/{id}/