Launch Week 02 wrapped — explore all five launches

Update Classifier

PUThttps://api.confident-ai.com/v1/classifiers/{classifierId}

Updates a classifier. Only the fields you send are changed; omitting a field leaves it untouched, and sending null clears it.

A classifier's dataModel cannot be changed after creation, and a preset can only be applied when creating one. Requires the Starter plan or above.

PUT/v1/classifiers/{classifierId}
curl -X PUT "https://api.confident-ai.com/v1/classifiers/{classifierId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "autoClassify": false
}'
200
{
  "success": true,
  "data": {
    "classifier": {
      "id": "CLASSIFIER-ID",
      "name": "Sentiment",
      "enabled": true,
      "autoClassify": false,
      "dataModel": "TRACE",
      "labels": []
    }
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/workflows"
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • classifierIdstringRequired

    The unique identifier of the classifier.

Request body

  • descriptionstring

    What this classifier is for.

  • enabledboolean

    Whether the classifier runs at all. Defaults to true.

  • autoClassifyboolean

    Whether incoming items are classified automatically as they arrive. Defaults to true.

  • filtersobject

    A set of filter groups combined by a top-level operator.

    Show 2 propertiesHide 2 properties
    • operatorenumRequired

      How filters or groups are combined.

      Show 2 enum valuesHide 2 enum values
      • AND
      • OR
    • groupslist of objectsRequired

      The filter groups.

      Show 2 propertiesHide 2 properties
      • operatorenumRequired

        How filters or groups are combined.

        Show 2 enum valuesHide 2 enum values
        • AND
        • OR
      • filterslist of objectsRequired

        The filter rows in this group.

        Show 4 propertiesHide 4 properties
        • categorystringRequired

          The property a filter row matches on (e.g. "Name", "User Id", "Model", "Metadata"). The set of valid values depends on the line's dataModel.

        • conditionenumRequired

          The comparison a filter row applies. Valid conditions depend on the category.

          Show 18 enum valuesHide 18 enum values
          • Is
          • Is not
          • Is equal to
          • Does not equal
          • Is less than
          • Is equal or less than
          • Is greater than
          • Is equal or greater than
          • Has
          • Has not
          • Contains
          • Contains only
          • Does not contain
          • Has increased by more than
          • Has increased by less than
          • Has decreased by more than
          • Has decreased by less than
          • Has changed from
        • valuestring | number | list of stringsRequired

          The value to match against.

          Show 3 variantsHide 3 variants
          • string

          • OR
          • number

          • OR
          • list of strings

        • keystring

          The property key. Auto-populated from category when omitted; required for Metadata, Metric, and Classifier filters.

  • autoGenerationConfigobject

    Drives label generation. Both required keys must be set before the generate endpoint will run.

    Show 3 propertiesHide 3 properties
    • summaryPromptstringRequired

      What the model should look for when clustering sampled traffic into themes.

    • nClustersintegerRequired

      Roughly how many themes to cluster the sample into.

    • sampleSizeinteger

      How many traces or threads to sample. Defaults to 200.

  • namestring

    A new name, unique per data model within the project.

Response

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Show 1 propertyHide 1 property
    • classifierobject

      Show 9 propertiesHide 9 properties
      • idstring

        The unique identifier of the classifier.

      • namestring

        The classifier's name.

      • dataModelenum

        What kind of item the classifier classifies.

        Show 2 enum valuesHide 2 enum values
        • TRACE
        • THREAD
      • labelslist of objects

        The labels this classifier can apply.

        Show 6 propertiesHide 6 properties
        • idstring

          The unique identifier of the label.

        • namestring

          The label's name.

        • descriptionstring

          When this label applies. This is the instruction the classifying model reads, so it should describe the condition rather than restate the name.

        • 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
        • polarityenum

          Whether more of this label is good, bad, or neither, for trend reporting.

          Show 3 enum valuesHide 3 enum values
          • HIGHER_IS_BETTER
          • LOWER_IS_BETTER
          • NEUTRAL
      • descriptionstring

        What this classifier is for.

      • enabledboolean

        Whether the classifier runs at all. Defaults to true.

      • autoClassifyboolean

        Whether incoming items are classified automatically as they arrive. Defaults to true.

      • filtersobject

        A set of filter groups combined by a top-level operator.

        Show 2 propertiesHide 2 properties
        • operatorenum

          How filters or groups are combined.

          Show 2 enum valuesHide 2 enum values
          • AND
          • OR
        • groupslist of objects

          The filter groups.

          Show 2 propertiesHide 2 properties
          • operatorenum

            How filters or groups are combined.

            Show 2 enum valuesHide 2 enum values
            • AND
            • OR
          • filterslist of objects

            The filter rows in this group.

            Show 4 propertiesHide 4 properties
            • categorystring

              The property a filter row matches on (e.g. "Name", "User Id", "Model", "Metadata"). The set of valid values depends on the line's dataModel.

            • conditionenum

              The comparison a filter row applies. Valid conditions depend on the category.

              Show 18 enum valuesHide 18 enum values
              • Is
              • Is not
              • Is equal to
              • Does not equal
              • Is less than
              • Is equal or less than
              • Is greater than
              • Is equal or greater than
              • Has
              • Has not
              • Contains
              • Contains only
              • Does not contain
              • Has increased by more than
              • Has increased by less than
              • Has decreased by more than
              • Has decreased by less than
              • Has changed from
            • valuestring | number | list of strings

              The value to match against.

            • keystring

              The property key. Auto-populated from category when omitted; required for Metadata, Metric, and Classifier filters.

      • autoGenerationConfigobject

        Drives label generation. Both required keys must be set before the generate endpoint will run.

        Show 3 propertiesHide 3 properties
        • summaryPromptstring

          What the model should look for when clustering sampled traffic into themes.

        • nClustersinteger

          Roughly how many themes to cluster the sample into.

        • sampleSizeinteger

          How many traces or threads to sample. Defaults to 200.

  • linkstring

    A link to the workflows page.

Built byConfident AI