ai_classify_batch
Batch text classifier — Classify up to 25 texts in one call (support tickets, leads, reviews, emails, intents). texts = items separated by | or newlines, or a JSON array (each up to 1,000 chars). labels = comma-separated allowed labels (optional; without it the model invents up to 8 reusable categories). Optional multi=true (1-3 labels each) and context= (what the texts are). Labels are snapped offline to your allowed set, off-list answers are dropped and counted, and you get per-item label, confidence and reason, a label distribution, and a CLEAN / MOSTLY_CLEAN / REVIEW verdict. Workers AI llama-3.3-70b. Price: $0.012 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"texts": "<texts>",
"labels": "<labels>"
},
"name": "ai_classify_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| texts | Yes | e.g. My card was charged twice this month|How do I reset my password?|The new dashboard is great | |
| labels | Yes | e.g. billing,account,feedback |