Launch Week 3: Five days of launches

Generate Classifier Labels

(v2)

POST

Discovers labels for a classifier from your project's real traffic: it samples recent traces or threads, clusters them with the classifier's autoGenerationConfig, and writes the themes it finds back as RECOMMENDED labels for a human to review.

The run is asynchronous, so poll the labels endpoint for results. Each run first deletes every existing RECOMMENDED label, while labels already promoted to ACTIVE are kept and passed to the generator so it does not propose them again. autoGenerationConfig must already have summaryPrompt and nClusters set. Reading traffic and running the model consumes usage. Requires the Starter plan or above.

POST/v2/classifiers/{classifierId}/generate
curl -X POST "https://api.confident-ai.com/v2/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",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • classifierIdstringRequired

    The id of the classifier.

Response

Generate Classifier Labels succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The outcome of dispatching a label generation run. The run itself is asynchronous and returns no handle, so poll the labels endpoint for its results.

    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 — it is an outcome, not an error.

    • messagestring

      A human-readable explanation of the outcome.

  • linkstring

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

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI