Generate Classifier Labels
POSThttps://api.confident-ai.com/v1/classifiers/{classifierId}/generate
Discovers labels for a classifier from your project's real traffic: it samples recent traces (or threads), clusters them using the classifier's autoGenerationConfig, and writes the themes it finds back as labels with status RECOMMENDED for a human to review.
The run is asynchronous — started true means it was dispatched, not that labels exist yet, so poll the labels endpoint for the results. Each run first deletes every existing RECOMMENDED label on the classifier; labels already promoted to ACTIVE are kept and passed to the generator so it does not propose them again. Reading production traffic and running the model consumes usage.
autoGenerationConfig must already have summaryPrompt and nClusters set. A started false response is not an error — it means there was too little traffic to sample, or sampling was briefly unavailable. Requires the Starter plan or above.
curl -X POST "https://api.confident-ai.com/v1/classifiers/{classifierId}/generate" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"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_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
classifierIdstringRequiredThe unique identifier of the classifier to generate labels for.
Response
successbooleanIndicates if the request was handled.
dataobjectShow 3 propertiesHide 3 properties
classifierIdstringThe classifier labels were generated for.
startedbooleanWhether a generation run was dispatched. False means there was too little traffic to sample, or sampling was briefly unavailable.
messagestringA human-readable explanation of the outcome.
linkstringA link to the workflows page.