Launch Week 02 wrapped — explore all five launches

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.

GET/v2/classifiers/{classifierId}/labels
curl -X GET "https://api.confident-ai.com/v2/classifiers/{classifierId}/labels" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • classifierIdstringRequired

    The id of the classifier.

Query parameters

  • pageintegerdefault: 1

    The page to return. Defaults to 1.

  • pageSizeintegerdefault: 25

    The number of results per page, at most 100. Defaults to 25.

Response

List Labels succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    One page of labels, with the total across all pages.

    Show 4 propertiesHide 4 properties
    • labelslist of objects

      The labels for the current page, ordered by name.

      Show 4 propertiesHide 4 properties
      • idstring

        The id of the label, generated by Confident AI.

      • namestring

        The name of the label.

      • enabledboolean

        Whether the label can be applied.

      • statusenum

        ACTIVE labels are in use; RECOMMENDED ones are generated suggestions awaiting review.

        Show 2 enum valuesHide 2 enum values
        • RECOMMENDED
        • ACTIVE
    • totalLabelsinteger

      The total number of labels on this classifier across all pages.

    • pageinteger

      The page this response covers.

    • pageSizeinteger

      The number of labels per page.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI