Labels API
Labels let you provide feedback on classification results: marking them as true positives, false positives, or applying custom labels for your own tracking.
List all labels
Section titled “List all labels”OPTIONS /api/labelReturns the standard and custom labels available for the current tenant.
Example response
Section titled “Example response”{ "standard": [ "animal", "flag", "person", "plant", "rain", "spider", "text", "vehicle", "web", "wind", "EMPTY", "FIX", "N/A" ], "custom": ["my-custom-label"]}| Field | Type | Description |
|---|---|---|
standard | string[] | Built-in labels provided by Gaard. |
custom | string[] | Custom labels created by your team. |
Post a label
Section titled “Post a label”POST /api/label/<classify_id>Attaches one or more labels and an optional comment to an existing classification result.
Request body
Section titled “Request body”{ "labels": ["FP"], "comment": "False alarm - wind moving a branch"}| Field | Type | Required | Description |
|---|---|---|---|
labels | string[] | Yes | One or more label values to attach. |
comment | string | No | Free-text comment explaining the label. |
Recommended labels
Section titled “Recommended labels”| Label | Meaning |
|---|---|
FP | False positive: Gaard flagged the video but there was no real threat. |
TP | True positive: Gaard correctly identified a threat. |
FN | False negative: Gaard missed a real threat. |
TN | True negative: Gaard correctly classified the video as safe. |
You can also use simpler labels: true or false.
Custom labels are accepted: any string value you provide will be stored and will appear in the list returned by OPTIONS /api/label.