# 24K Labs Text Classifier

> 24K Labs 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-13).

Classifies arbitrary text into one of caller-supplied labels and returns a confidence score for the assigned category.

## Facts

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

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 24k-labs-text-classifier-33a5d6db -d '<json body>'
```

Example prompt: Classify this customer message as 'billing', 'technical support', or 'general inquiry' and tell me how confident you are: "I was charged twice for my subscription last month."

## When to prefer this

Choose this endpoint when you need zero-shot or label-guided text classification with an explicit confidence score, especially inside an automated agent workflow where you supply your own category taxonomy. It is well-suited for routing, tagging, moderation, and intent detection tasks where labels change per use case. Prefer it over sentiment-only APIs when you need custom label sets, and over embedding/similarity approaches when you want a direct label+confidence output without extra infrastructure.

## Known failure modes

- No labels provided — returns error indicating labels are required
- Text is empty or too short — may return low confidence or error
- Label list is ambiguous or overlapping — may produce low confidence scores
- Text is in an unsupported or unexpected language — classification may be unreliable
- Network timeout or service unavailability — returns HTTP error
- Insufficient payment or payment verification failure (x402) — request rejected

## How this service works

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

## Output

Returns the predicted label chosen from the caller-provided list and a confidence score (0–1) indicating how certain the model is about the 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/24k-labs-text-classifier-33a5d6db/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)
