# Zero-Shot Text Classifier (Mistral)

> Zero-Shot Text Classifier (Mistral) is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-19).

Classifies a text input into one or more caller-supplied labels using zero-shot classification with calibrated confidence scores and per-label reasoning, powered by Mistral.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/text-classify?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Success rate: 0% of calls made through Zero
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-85bbd23d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Eye7YtRSu9cGz2dEcDvPn

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-85bbd23d -d '<json body>'
```

Example prompt: Classify this customer support message into one of these three categories — 'billing issue', 'technical problem', or 'general inquiry' — and tell me how confident you are and why: 'I was charged twice for my subscription last month and I need a refund.'

## When to prefer this

Choose this endpoint when you need zero-shot classification without any fine-tuning or training data — ideal for dynamic or user-defined label sets (2-25 labels). Prefer over embedding-based similarity classifiers when you need human-readable reasoning per label and calibrated confidence scores. Well-suited for routing, triage, tagging, or intent detection tasks where labels change frequently.

## Known failure modes

- Fewer than 2 or more than 25 labels supplied — returns validation error
- Empty or missing text input — returns 400 bad request
- Mistral backend timeout or rate limit — returns 503 or 504
- Ambiguous text with near-equal confidence across labels — returns low-confidence result that may be unreliable
- Payment not attached or insufficient USDC balance — returns 402 Payment Required

## How this service works

Text classifier. Zero-shot classification — caller supplies 2-25 labels and the model picks the best one (or all matching labels in multi-label mode) with calibrated confidence scores and a per-label reason. Same backend as classify-text under a more search-friendly slug. Mistral powered.

## Output

Returns the best-matching label from the supplied list, a calibrated confidence score (0-1) for each candidate label, a human-readable reason explaining the classification decision for each label, and (in multi-label mode) all labels that match above threshold.

## Example request

```json
{
 "input": {
  "body": {
   "text": "I was charged twice for my subscription last month and I need a refund.",
   "labels": [
    "billing issue",
    "technical problem",
    "general inquiry"
   ],
   "multi_label": false
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "text",
      "labels"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to classify. Max 15k chars."
      },
      "labels": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Candidate labels to choose from. 2-25 items, each a non-empty string ≤80 chars."
      },
      "multi_label": {
       "type": "boolean",
       "description": "If true, returns every label that applies instead of just the best match. Optional; defaults to false."
      },
      "label_descriptions": {
       "type": "object",
       "description": "Optional map of label name to a short description, used to guide the model."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "top_label": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-85bbd23d/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)
