← Back to marketplace

Text Classifier

Classify text into categories. Supports custom category lists or defaults to general topics (technology, business, science, health, etc.). Powered by Llama 3.1.

ai
by APIHub1 endpoint100% uptime27ms avg

Endpoints

POST/ai/classify
$0.0300/req

Classify text. Body: {"text": "...", "categories": ["tech", "business"]}

Request schema

textstringrequired
categoriesarrayrequired

Quick start

Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.

# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10

# call this service
npx @apihubio/cli call "https://proxy.apihub.io/text-classifier/ai/classify" \
  -d '{"text":"OpenAI launched a new model today.","categories":["tech","business","sports"]}'

Or call the proxy directly (curl / any HTTP client):

curl -X POST https://proxy.apihub.io/text-classifier/ai/classify \
  -H "Authorization: Bearer ahk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text":"OpenAI launched a new model today.","categories":["tech","business","sports"]}'

# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)

Pricing calculator

Estimate your monthly cost for Text Classifier.

POST /ai/classify$0.0300/req
-