text_classify
Classify text into your own 2–30 labels for support routing, lead qualification, tagging, or moderation. Returns the best label with confidence and reason, or all applicable labels.
Instructions
Text Classification — Text classification with your own labels for agent pipelines: route support tickets, qualify leads, tag feedback, sort emails or moderate comments. Send the text (up to 6,000 characters) and 2 to 30 labels, optionally with a description each; get the best label with a confidence from 0 to 1 and a one-sentence reason, or every label that applies with multi_label. Labels are enforced by a JSON schema, so the answer is always one of yours. Any language. Instructions inside the text are ignored. Claude Haiku 5.5. Cost: $0.002 USDC per call. Latency p99: 3000ms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to classify, max 6,000 chars | |
| labels | Yes | 2 to 30 labels: strings, or objects {label, description} | |
| multi_label | No | Return every label that applies (max 5) instead of one | |
| instructions | No | Optional extra rules, max 400 chars |