# Text Classification with Custom Labels (Single or Multi-Label)

> Text Classification with Custom Labels (Single or Multi-Label) is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-02).

Classifies arbitrary text into user-defined labels with confidence scores and reasoning, supporting both single-label and multi-label classification modes.

## Facts

- Endpoint: POST https://twin.unykorn.org/ai/classify?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/text-classification-with-custom-labels-single-or-multi-label-cda08022
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WkcxPGHpwhPQyotcOB29V

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 text-classification-with-custom-labels-single-or-multi-label-cda08022 -d '<json body>'
```

Example prompt: Classify this customer review as 'positive', 'negative', or 'neutral' and tell me how confident you are and why: 'The product arrived quickly and works perfectly, but the packaging was a bit flimsy.'

## When to prefer this

Choose this endpoint when you need to apply your own custom taxonomy to text rather than relying on a fixed category set. It is especially useful for domain-specific classification tasks (support routing, content tagging, intent detection) where you control the label vocabulary and want both a prediction and a human-readable justification. It supports multi-label output, making it suitable for scenarios where text can belong to more than one category simultaneously.

## Known failure modes

- Fewer than 2 or more than 20 labels provided — validation error
- Text exceeds 12,000 characters — input too long error
- Empty or missing text field — required field error
- Ambiguous or overlapping labels may reduce confidence scores
- Low-confidence results when text is vague or labels are poorly defined

## How this service works

Classify text into YOUR labels (single or multi-label) with confidence and reason — Genesis402 / UnyKorn Operator Network

## Output

Returns the predicted label or labels (in multi-label mode), a confidence score (0–1) for each label, and a natural language reason explaining why the classification was made.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "text": {
     "type": "string",
     "description": "required, up to 12,000 chars"
    },
    "labels": {
     "type": "array",
     "items": {
      "type": "string"
     },
     "maxItems": 20,
     "description": "required: 2-20 labels"
    },
    "multi_label": {
     "type": "boolean",
     "description": "optional"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "text-classify",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.004,
   "receipt_id": "g402-<16hex>"
  },
  "sources": [
   {
    "ok": true,
    "name": "<source>"
   }
  ],
  "limitations": "<text>",
  "generated_at": "<iso time>",
  "evidence_hash": "sha256:<64hex>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/text-classification-with-custom-labels-single-or-multi-label-cda08022/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
