Introducing confident-trace — our new tracing SDK

Generate Classifier Labels

(v1)

POST

Asynchronously samples recent traces or threads, clusters them using the classifier's autoGenerationConfig (which must have summaryPrompt and nClusters set), and writes the discovered themes back as RECOMMENDED labels for review — poll the labels endpoint for results. Each run replaces existing RECOMMENDED labels while keeping ACTIVE ones, and started: false is not an error, just too little traffic to sample. Requires the Starter plan or above.

POST/v1/classifiers/{classifierId}/generate
curl -X POST "https://api.confident-ai.com/v1/classifiers/{classifierId}/generate" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "classifierId": "CLASSIFIER-ID",
    "started": true,
    "message": "Label generation started. Generated labels appear with status RECOMMENDED when the run completes."
  },
  "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 to generate labels for.

Response

  • successboolean

    Indicates if the request was handled.

  • dataobject

    Show 3 propertiesHide 3 properties
    • classifierIdstring

      The classifier labels were generated for.

    • startedboolean

      Whether a generation run was dispatched. False means there was too little traffic to sample, or sampling was briefly unavailable.

    • messagestring

      A human-readable explanation of the outcome.

  • linkstring

    A link to the workflows page.

Built byConfident AI