List Labels
GEThttps://api.confident-ai.com/v2/classifiers/{classifierId}/labels
Lists a classifier's labels one page at a time, ordered by name. This is also how you read the results of a generation run — generated suggestions arrive with status RECOMMENDED. Each label is returned as a summary row; retrieve one by id for its description and polarity. Requires the Starter plan or above.
curl -X GET "https://api.confident-ai.com/v2/classifiers/{classifierId}/labels" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"labels": [
{
"id": "<CLASSIFIER-LABEL-ID>",
"name": "Positive",
"enabled": true,
"status": "RECOMMENDED"
}
],
"totalLabels": 3,
"page": 1,
"pageSize": 25
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/workflows",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
classifierIdstringRequiredThe id of the classifier.
Query parameters
pageintegerdefault: 1The page to return. Defaults to 1.
pageSizeintegerdefault: 25The number of results per page, at most 100. Defaults to 25.
Response
List Labels succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne page of labels, with the total across all pages.
Show 4 propertiesHide 4 properties
labelslist of objectsThe labels for the current page, ordered by name.
Show 4 propertiesHide 4 properties
idstringThe id of the label, generated by Confident AI.
namestringThe name of the label.
enabledbooleanWhether the label can be applied.
statusenumACTIVE labels are in use; RECOMMENDED ones are generated suggestions awaiting review.
Show 2 enum valuesHide 2 enum values
RECOMMENDEDACTIVE
totalLabelsintegerThe total number of labels on this classifier across all pages.
pageintegerThe page this response covers.
pageSizeintegerThe number of labels per page.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.