# Zero-Shot Text Classifier with Custom Labels

> Zero-Shot Text Classifier with Custom Labels is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Classifies text into caller-supplied labels using zero-shot inference, supporting multi-label mode with calibrated confidence scores and reasoning.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/classify
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Success rate: 0% of calls made through Zero
- Rating: 4.3 / 5 from 1 review
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-db865b15
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cTMO99REAJNp3vDVhGH0F

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 x402-deployer-x402-deployer-workers-dev-db865b15 -d '<json body>'
```

Example prompt: Classify this customer review into one or more of these labels — 'shipping', 'product quality', 'customer service', 'pricing' — and tell me how confident you are and why: 'The item arrived late and the packaging was damaged, but the refund process was surprisingly smooth.'

## When to prefer this

Choose this endpoint when you need to classify text into arbitrary, user-defined categories without any prior training data — especially when labels change per request or when multi-label output with confidence scores and reasoning is required. Prefer this over fine-tuned classifiers when flexibility and zero-shot generalization matter more than maximum accuracy on a fixed taxonomy.

## Known failure modes

- Empty or missing text input returns a 400 error
- No labels supplied results in a 400 validation error
- Overly long input text may exceed token limits and return a 413 or truncation error
- Ambiguous or highly overlapping labels may produce low-confidence or near-equal scores across all labels
- Network timeout on the Cloudflare Worker edge for very large payloads
- Payment not included or insufficient USDC results in 402 Payment Required

## How this service works

Zero-shot text classifier. Caller supplies labels. Multi-label mode. Calibrated confidences + reasoning.

## Output

Returns a list of labels with calibrated confidence scores (0–1) and a reasoning string explaining why each label was or was not assigned; supports both single-label (argmax) and multi-label output modes.

## Example request

```json
{
 "input": {
  "body": {
   "text": "This movie was absolutely fantastic! The cinematography was stunning and the acting was superb.",
   "labels": [
    "positive",
    "negative",
    "neutral"
   ],
   "multi_label": false
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to classify. Max 15k chars."
      },
      "labels": {
       "type": "array",
       "description": "Candidate labels the model picks from. 2-25 items, each a string up to 80 chars."
      },
      "multi_label": {
       "type": "boolean",
       "description": "Boolean, default false. When true, returns every label that applies instead of just the top one."
      },
      "label_descriptions": {
       "type": "object",
       "description": "Optional object mapping each label to a short description to guide classification."
      }
     },
     "required": [
      "text",
      "labels"
     ]
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "top_label": {
       "type": "string"
      }
     }
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-db865b15/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
