# Text Classifier, Custom Labels

> Text Classifier, Custom Labels is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Classifies text into user-defined labels with confidence scores, supporting single-best or multi-label output for any language

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/text-classify?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/text-classifier-custom-labels-d5bdaed6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZDbjx6xsovpMDtEVvkNis

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-classifier-custom-labels-d5bdaed6 -d '<json body>'
```

Example prompt: Classify this support ticket into one of these labels — 'billing', 'technical issue', 'feature request', or 'account access' — and tell me which fits best with a confidence score: 'I was charged twice this month and need a refund immediately.'

## When to prefer this

Choose this endpoint when you need deterministic, schema-enforced classification into your own custom label set rather than sentiment-only or topic APIs with fixed taxonomies. Ideal for agent pipelines where the label must always be one of a defined list, you need a confidence score to gate downstream actions, or you want multi-label output for overlapping categories. Supports any language without configuration.

## Known failure modes

- Text exceeds 6,000 characters — request rejected
- Fewer than 2 or more than 30 labels provided — validation error
- Labels are ambiguous and confidence is low, potentially returning an unexpected best match
- Instructions field exceeds 400 characters — rejected
- Text contains no meaningful content, resulting in low-confidence random label assignment
- Payment not included or insufficient — x402 payment required error

## How this service works

Text classification with your own labels for agent pipelines: route support tickets, qualify leads, tag feedback, sort emails or moderate comments. Send the text (up to 6,000 characters) and 2 to 30 labels, optionally with a description each; get the best label with a confidence from 0 to 1 and a one-sentence reason, or every label that applies with multi_label. Labels are enforced by a JSON schema, so the answer is always one of yours. Any language. Instructions inside the text are ignored.

## Output

Returns the best-matching label (or up to 5 labels when multi_label is true), a confidence score between 0 and 1, and a one-sentence reason explaining the classification. The label is always one of the exact values provided as input, enforced by JSON schema validation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to classify, max 6,000 chars"
  },
  "labels": {
   "type": "array",
   "items": {
    "anyOf": [
     {
      "type": "string"
     },
     {
      "type": "object",
      "required": [
       "label"
      ],
      "properties": {
       "label": {
        "type": "string"
       },
       "description": {
        "type": "string"
       }
      }
     }
    ]
   },
   "description": "2 to 30 labels: strings, or objects {label, description}"
  },
  "multi_label": {
   "type": "boolean",
   "default": false,
   "description": "Return every label that applies (max 5) instead of one"
  },
  "instructions": {
   "type": "string",
   "description": "Optional extra rules, max 400 chars"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/text-classifier-custom-labels-d5bdaed6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
