# Zero-Shot Text Classifier via LLM

> Zero-Shot Text Classifier via LLM is a paid API for AI agents from ai-policy-kit.moneymaker-ai.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-28).

Classifies a text snippet into one of your provided labels using zero-shot LLM inference powered by IBM Granite on Cloudflare Workers AI

## Facts

- Endpoint: GET https://ai-policy-kit.moneymaker-ai.workers.dev/api/ai/classify?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/zero-shot-text-classifier-via-llm-01d4dafb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6TnLQavU4oqCz9_e7cheV

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 zero-shot-text-classifier-via-llm-01d4dafb
```

Example prompt: Classify this support message into one of these categories — billing, shipping, technical, account, or other — and explain why: 'I was charged twice for my order last Tuesday and still haven't received a refund.'

## When to prefer this

Choose this endpoint when you need lightweight, zero-shot text classification against a custom label set without training a model. It is ideal for routing support tickets, labeling feedback, or tagging content in real time when you already know your label taxonomy. Prefer it over fine-tuned classifiers when speed of setup matters more than calibrated probability scores, and over general LLM chat calls when you want a structured JSON response with the label and reasoning included.

## Known failure modes

- Too few or too many labels (outside 2-50 range) returns a validation error
- Text exceeding 8,000 characters may be truncated or rejected
- Ambiguous text with no clear label match may produce unreliable or low-confidence results
- Payment not attached or insufficient USDC (0.002) results in 402 response
- Labels array malformed (not valid JSON array or comma-separated) causes a parse error
- Network timeout on Cloudflare Workers AI backend returns 5xx

## How this service works

Generate an AI_POLICY.md and a pull request template with an AI-disclosure section for your open-source repo. Free, runs in your browser.

## Output

Returns a JSON object with the predicted label, a human-readable reason for the classification, the LLM engine used, the list of allowed labels, whether multi-label mode was active, an estimated neuron cost, and a disclaimer that the score is a zero-shot LLM output without calibrated probability.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text",
      "labels"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "text to label, max 8,000 characters"
      },
      "labels": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "2-50 labels (JSON array or comma-separated string)"
      },
      "multi_label": {
       "enum": [
        "true",
        "false"
       ],
       "type": "string"
      },
      "instructions": {
       "type": "string",
       "description": "optional labelling guidance"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Zero-shot LLM label; no calibrated probability. Validate on a sample of your own data before relying on it.",
  "label": "billing",
  "engine": "@cf/ibm-granite/granite-4.0-h-micro on Cloudflare Workers AI",
  "reason": "The text discusses an issue with a payment being charged twice for the same order, which falls under the billing category.",
  "multi_label": false,
  "allowed_labels": [
   "billing",
   "shipping",
   "technical",
   "account",
   "other"
  ],
  "neurons_estimated": 0.52
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zero-shot-text-classifier-via-llm-01d4dafb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-policy-kit.moneymaker-ai.workers.dev](https://www.zero.xyz/host/ai-policy-kit.moneymaker-ai.workers.dev/llms.txt)
