# 24KLabs Text Classifier

> 24KLabs Text Classifier is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-14).

Classifies a given text into one of the caller-supplied labels, returning the predicted label and confidence score.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/classify-text
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24klabs-text-classifier-264cd452
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DeUFN98Oa_RG4fUKFQK4b

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 24klabs-text-classifier-264cd452 -d '<json body>'
```

Example prompt: Classify this customer message — 'Your delivery was late and the package was damaged' — into one of these labels: complaint, compliment, question, or refund-request, and tell me your confidence.

## When to prefer this

Choose this endpoint when you need fast, zero-shot text classification against a custom set of labels you define at call time — especially useful when categories change per use-case and you don't want to train a model. Prefer it over general-purpose LLM prompting when you need a structured label + confidence score returned in a consistent, machine-readable format at a fixed per-call price.

## Known failure modes

- No labels provided — endpoint requires at least two candidate labels to choose from
- Empty or too-short text input returns a low-confidence or error response
- Ambiguous text where all labels score similarly yields a low confidence score
- Unsupported language text may produce unreliable results
- Rate limits or payment failures (x402) will return 402 or 429 status codes

## How this service works

Classify text into one of your provided labels, with confidence.

## Output

Returns the winning label from the caller-supplied list and a numeric confidence score (0–1) indicating how certain the model is about that classification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  },
  "labels": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "label": "shipping"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24klabs-text-classifier-264cd452/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
