Generate Classifier Labels
(v2)POST
Generates labels for a classifier from your project's real traffic: it samples recent traces, spans or threads and runs them through the classifier's normal auto-classification pipeline. Repeated proposals are merged and written back as RECOMMENDED labels for a human to review.
The run is asynchronous, so poll the labels endpoint for results. Existing labels are retained, and the sampled entities receive ordinary classification results. Auto Classify must be enabled. Reading traffic and running the model consumes usage.
curl -X POST "https://api.confident-ai.com/v2/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 as the sampled data is classified."
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/workflows",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
classifierIdstringRequiredThe id of the classifier.
Response
Generate Classifier Labels succeeded.
successbooleanIndicates if the request was successful.
dataobjectThe 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
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 — it is an outcome, not an error.
messagestringA human-readable explanation of the outcome.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.