Classify content items
Classify one or more content items (text/images) jointly into a single label with confidence scores. Use this tool when you need to categorize, tag, route, or make decisions about content based on context. All content items are analyzed together to produce one classification result. You can either: - Provide explicit labels for the classification task - Provide a description and let the system infer appropriate labels - Use an existing project_id to reuse previous labels The system learns from feedback and improves over time.
Response Body
application/json
application/json
curl -X POST "https://loading/classify" \ -H "Content-Type: application/json" \ -d '{ "content": [ { "content": "This product is amazing!", "type": "text" }, { "content": "Terrible quality, broke immediately", "type": "text" } ], "labels": [ "positive", "negative" ], "project_id": "sentiment-analysis-v1" }'{
"detection_id": "det_a1b2c3d4e5f6g7h8",
"ground_truth_url": "https://api.example.com/ground_truth/det_a1b2c3d4e5f6g7h8",
"label": "positive",
"labels": {
"negative": 0.08,
"positive": 0.92
},
"labels_used": [
"positive",
"negative"
],
"processing_time_ms": 234,
"project_id": "sentiment-analysis-v1"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Image Optimization
Learn how to compress and resize images to stay within request size limits
Submit ground truth feedback POST
Provide the correct label(s) for a previous classification to improve future accuracy. Feedback only affects the specific project_id associated with this detection. New labels are automatically added to that project's label set.