Comment on page
FAF API
get
https://faf.traces.cloud/
api/v1/health
health
Bash
curl -X GET https://faf.traces.cloud/api/v1.1/health -H "x-api-key: YOUR_API_KEY"
post
https://faf.traces.cloud/
api/v1/filter-alarm
filter-alarm
An example of a request with 5 frames.
Bash
curl -X POST "https://faf.traces.cloud/api/v1.1/filter-alarm"
-H "accept: */*"
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: multipart/form-data"
-F "metadata={ "event_id": "ddf27b34-d3b5-41a5-b2a6-3873a589ec09", "camera_id": "b5271b30-aecd-4897-bc95-ff25c8466b9e", "timestamp": 1585840725 }" -F
"image_0=@customer_frame0.png;type=image/png" -F "image_1=@customer_frame1.png;type=image/png" -F "image_2=@customer_frame2.png;type=image/png" -F "image_3=@customer_frame3.png;type=image/png" -F "image_4=@customer_frame4.png;type=image/png"
An example of a request with 12 frames.
curl -X POST "https://faf.traces.cloud/api/v1.1/filter-alarm"
-H "accept: */*"
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: multipart/form-data"
-F "metadata={ "event_id": "ddf27b34-d3b5-41a5-b2a6-3873a589ec09", "camera_id": "b5271b30-aecd-4897-bc95-ff25c8466b9e", "timestamp": 1585840725 }"
-F "image_0=@customer_frame0.png;type=image/png"
-F "image_1=@customer_frame1.png;type=image/png"
-F "image_2=@customer_frame2.png;type=image/png"
-F "image_3=@customer_frame3.png;type=image/png"
-F "image_4=@customer_frame4.png;type=image/png"
-F "image_5=@customer_frame5.png;type=image/png"
-F "image_6=@customer_frame6.png;type=image/png"
-F "image_7=@customer_frame7.png;type=image/png"
-F "image_8=@customer_frame8.png;type=image/png"
-F "image_9=@customer_frame9.png;type=image/png"
-F "image_10=@customer_frame10.png;type=image/png"
-F "image_11=@customer_frame11.png;type=image/png"
post
https://faf.traces.cloud/
api/v1/filter-video-alarm
filter-video-alarm
Each trigger includes the following information for each frame: '
object_type
', 'action
', 'bbox
', 'frame_id
', and 'direction
'. Input data

Click to Zoom
FAF Response
{
"alarm_confirmed": false,
"alarm_confidence": null,
"triggered_by": []
}
Input data

Click to Zoom
FAF Response
{
"alarm_confirmed": true,
"alarm_confidence": 0.7866996370706637,
"triggered_by": [
{
"object_type": "person",
"action": "moving",
"bbox": [
621,
1051,
711,
1269
],
"frame_id": 0,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
959,
1100,
1031,
1337
],
"frame_id": 0,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
718,
1148,
815,
1368
],
"frame_id": 0,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
769,
977,
859,
1233
],
"frame_id": 1,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
687,
971,
771,
1189
],
"frame_id": 1,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
940,
983,
1026,
1217
],
"frame_id": 1,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
983,
875,
1059,
1086
],
"frame_id": 2,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
833,
886,
894,
1121
],
"frame_id": 2,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
738,
871,
816,
1080
],
"frame_id": 2,
"direction": null
}
]
}
Input data

Click to Zoom
FAF Response
{
"alarm_confirmed": true,
"alarm_confidence": 0.7540868690800507,
"triggered_by": [
{
"object_type": "vehicle",
"action": "moving",
"bbox": [
2084,
604,
2420,
774
],
"frame_id": 0,
"direction": null
},
{
"object_type": "vehicle",
"action": "moving",
"bbox": [
1433,
456,
1723,
588
],
"frame_id": 1,
"direction": null
},
{
"object_type": "vehicle",
"action": "moving",
"bbox": [
805,
514,
1104,
699
],
"frame_id": 2,
"direction": null
}
]
}
Input data

Click to Zoom
FAF Response
{
"alarm_confirmed": true,
"alarm_confidence": 0.6292241402835548,
"triggered_by": [
{
"object_type": "vehicle",
"action": "moving",
"bbox": [
677,
486,
925,
653
],
"frame_id": 0,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
447,
195,
496,
269
],
"frame_id": 0,
"direction": null
},
{
"object_type": "vehicle",
"action": "moving",
"bbox": [
673,
466,
923,
653
],
"frame_id": 1,
"direction": null
},
{
"object_type": "person",
"action": "moving",
"bbox": [
588,
393,
624,
495
],
"frame_id": 1,
"direction": null
},
{
"object_type": "vehicle",
"action": "moving",
"bbox": [
584,
468,
814,
620
],
"frame_id": 2,
"direction": null
}
]
}
Customers on the Advanced tier will receive comprehensive alarm responses that contain all the information from the General tier, as well as additional data fields such as
object_class
and object_color
. These fields provide additional context and insights into the alarm event, enabling customers to quickly and effectively respond to any issues with their system.The newly introducedobject_class
field provides supplementary information regarding the specific class of a vehicle that has triggered an alarm. The supported vehicle classes within our API solution include four distinct categories: "car", "truck", "bus", and "motorbike".
The recently addedobject_color
field outlines the color of a vehicle that has triggered an alarm. Our library comprises 147 distinct colors for this purpose. Theobject_color
value is computed for each bounding box associated with a vehicle trigger. It is important to note that factors such as varying lighting conditions and shadows may influence the accuracy of the detected color.
Below are some examples of input data and their corresponding responses with updated structure. These examples showcase the latest changes and improvements to the response format, enabling customers to better understand and utilize our API's features.
Example 1.
Input data

FAF Response
{
"alarm_confirmed": true,
"alarm_confidence": 0.8125502391157845,
"triggered_by": [
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
520,
352,
714,
512
],
"frame_id": 0,
"direction": null,
"object_color": "slategray"
},
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
413,
345,
574,
472
],
"frame_id": 1,
"direction": null,
"object_color": "slategray"
},
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
392,
322,
511,
450
],
"frame_id": 2,
"direction": null,
"object_color": "slategray"
}
]
}
Example 2.
Input data

FAF Response
{
"alarm_confirmed": true,
"alarm_confidence": 0.7021554756882509,
"triggered_by": [
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
588,
332,
672,
371
],
"frame_id": 0,
"direction": null,
"object_color": "darkslateblue"
},
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
628,
319,
709,
361
],
"frame_id": 1,
"direction": null,
"object_color": "darkslateblue"
},
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
727,
313,
826,
347
],
"frame_id": 2,
"direction": null,
"object_color": "darkslateblue"
}
]
}
Example 3.
Input data

FAF Response
{
"alarm_confirmed": true,
"alarm_confidence": 0.694689647096008,
"triggered_by": [
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
1537,
77,
1627,
167
],
"frame_id": 0,
"direction": null,
"object_color": "darkslategray"
},
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
1475,
137,
1579,
238
],
"frame_id": 1,
"direction": null,
"object_color": "darkslategray"
},
{
"object_type": "person",
"object_class": "person",
"action": "moving",
"bbox": [
451,
482,
490,
585
],
"frame_id": 1,
"direction": null,
"object_color": null
},
{
"object_type": "vehicle",
"object_class": "car",
"action": "moving",
"bbox": [
1379,
201,
1515,
316
],
"frame_id": 2,
"direction": null,
"object_color": "darkslategray"
},
{
"object_type": "person",
"object_class": "person",
"action": "moving",
"bbox": [
456,
476,
497,
575
],
"frame_id": 2,
"direction": null,
"object_color": null
}
]
}
Key | Type | Example | Description |
---|---|---|---|
camera_id* | str | "b5271b30-aecd-4897-bc95-ff25c8466b9e" | A unique ID number of the video camera. Used for AI auto training pipeline, consensus algorithm, and billing. |
timestamp* | 1585840725 | A timestamp in seconds since the epoch | |
event_id* | str | "ddf27b34-d3b5-41a5-b2a6-3873a589ec09" | A unique ID of the event. Used for synchronization and AI auto training pipeline |
motion_masks | list | [((0, 0), (900, 0), (900, 130), (0, 580)), ((1920, 1090), (1920, 500), (1000, 1090))] |
Last modified 2mo ago