Skip to content

Classification result

The classification result is returned by:

  • POST /api/classify?sync=true
  • GET /api/result/{id}
  • Webhooks when webhook delivery is configured
{
"success": false,
"error": "no access to current endpoint, make sure you are using correct API key"
}
{
"id": "6662efdb5200108549e3ac2b",
"accepted_at": "2024-06-07T13:32:43.811+02:00"
}
{
"id": "6662f5c1f897618de43f0bbd",
"status": {
"classify": "accepted",
"video": "accepted"
},
"camera_id": "134188-VI08",
"tenant": "test",
"duration": 1434714,
"duration_seconds": 1,
"model": "noname",
"version": "2.0.16123",
"error_code": 0,
"error_msg": "",
"risk": "",
"labels": ["intrusion"],
"scores": {
"person": 0.127,
"vehicule": 0.893,
"intrusion": 0.919,
"flag": 0.830,
"animal": 0.062,
"plant": 0.049,
"other": 0.020,
"wind": 0.007,
"rain": 0.005,
"web": 0.004,
"spider": 0.003,
"text": 0.001,
"NOTHING": 0.0003
},
"video": {
"videoname": "video.mp4",
"filesize": 246792,
"specs": {
"duration": 2.3,
"fps": 2.61,
"original.fps": 3,
"original.height": 480,
"original.width": 640,
"width": 426,
"height": 320,
"nframes": 6,
"original.nframes": 6
}
},
"metadata": {
"parc_origine": "XX",
"client_id": 134188,
"code_msg": "VI08",
"no_trans": "20818"
},
"created_at": "2024-06-07T13:57:55.230+02:00",
"started_at": "2024-06-07T13:57:55.230+02:00"
}
FieldJSONDescription
IDidUnique identifier of the result (classify_id).
CameraIDcamera_idCamera identifier, derived from metadata.
TenanttenantTenant identifier (mandatory).
ModelmodelModel used for classification (optional).
VersionversionModel version (optional).

The camera_id is generated from metadata:

camera_id = metadata.client_id + metadata.camera_id
camera_id = metadata.client_id + metadata.code_msg // fallback
FieldTypeJSONDescription
Durationint64durationClassification duration in milliseconds.
DurationSecondsintduration_secondsClassification duration in seconds.
FieldTypeJSONDescription
StatusobjectstatusNested status for classify and video processing.
ErrorCodeinterror_codeError code (0 = success).
ErrorMessagestringerror_msgDetailed error message.
ValueDescription
acceptedThe analysis has been accepted.
in-progressThe analysis is currently in progress.
doneThe analysis is completed.
errorAn error occurred during the analysis.
timeoutThe analysis timed out.
FieldTypeJSONDescription
RiskstringriskRisk level: safe, danger, or intrusion.
Labelsstring[]labelsLabels assigned by the analysis.
ScoresobjectscoresConfidence scores per label (0.0–1.0).

See Risk, labels, and scores for details on how scores determine risk levels.

FieldTypeJSONDescription
VideonamestringvideonameName of the video file.
FilesizeintfilesizeVideo file size in bytes.
VideoSpecsobjectspecsVideo specifications (resolution, fps, frame count).
FieldTypeJSONDescription
CreatedAttimecreated_atWhen the analysis was created.
StartedAttimestarted_atWhen the analysis started.
FieldTypeJSONDescription
MetadataobjectmetadataOptional additional data. See Metadata.