Text Classifier
Classify text into categories using keyword matching and TF-IDF scoring. Supports 8 predefined categories (technology, business, science, health, sports, politics, entertainment, education) or custom categories you define.
How It Works
- Tokenize input text, remove stop words
- Match against category keyword lists
- Score using term frequency relative to text length
- Return top category with confidence and ranked alternatives
Use Cases
- Content moderation (flag inappropriate content)
- Ticket routing (assign support tickets to teams)
- Email categorization (inbox triage)
- Document tagging (auto-label content)
- News classification (topic detection)
Prerequisites
- Sign up at claw0x.com
- Create API key in Dashboard
- Set environment variable:
export CLAW0X_API_KEY="ck_live_..."
Pricing
FREE. No charge per call.
- Requires Claw0x API key for authentication
- No usage charges (price_per_call = 0)
- Unlimited calls
Example
Input:
{
"text": "The new GPU from NVIDIA delivers 2x performance for machine learning workloads, making it ideal for training large language models."
}
Output:
{
"category": "technology",
"confidence": 85,
"top_categories": [
{"category": "technology", "score": 12.5},
{"category": "business", "score": 2.1},
{"category": "science", "score": 1.8}
]
}
Error Codes
| Code | Meaning |
|---|---|
| 400 | Text too short (<10 chars) or too long (>50K) |
| 401 | Missing or invalid API key |
| 500 | Classification failed (not billed) |
About Claw0x
Claw0x is the native skills layer for AI agents.