# Claude AI Text Classifier (x402)

> Claude AI Text Classifier (x402) is a paid API for AI agents from web-production-2d1051.up.railway.app, paid per call via x402, $0.005001/call, status unknown (last checked 2026-09-15).

Classifies text or JSON input into sentiment, topic, intent, urgency, or custom categories using Claude AI, with confidence scores and optional reasoning.

## Facts

- Endpoint: POST https://web-production-2d1051.up.railway.app/v1/classify
- Price: $0.005001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/claude-ai-text-classifier-x402-70b1b046
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Bct9qhrP_sHQZektqX53c

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 claude-ai-text-classifier-x402-70b1b046 -d '<json body>'
```

Example prompt: Classify this customer review by sentiment and include your reasoning — 'The delivery was fast but the product broke after one day.' Tell me the label, confidence score, and why you picked it.

## When to prefer this

Choose this endpoint when you need AI-powered text classification with confidence scoring and optional reasoning across preset categories (sentiment, topic, intent, urgency) or fully custom taxonomies. Ideal for agents that need structured, machine-readable classification output with calibrated confidence rather than raw LLM text. Prefer over generic LLM calls when you need consistent label schemas, multi-label ranking, and JSON responses. The micropayment model ($0.005/call) makes it cost-effective for moderate-volume classification tasks.

## Known failure modes

- Missing or invalid x402 USDC payment header returns 402 Payment Required
- Invalid or unsupported preset value returns 400 Bad Request
- preset=custom without taxonomy array returns 400 Bad Request
- taxonomy array with fewer than 2 or more than 20 labels returns 400 Bad Request
- Input exceeding size limits returns 413 Payload Too Large
- Malformed JSON body returns 400 Bad Request
- Claude model unavailability may return 503 Service Unavailable

## How this service works

Classify text or JSON into categories with AI: sentiment analysis, topic, intent detection, urgency triage, or a custom taxonomy. Returns labels with confidence scores and reasoning.

## Output

Returns a JSON object with the top classification label, confidence score (0–1), an optional ranked list of all labels with their individual confidence scores, a reasoning string explaining the classification, and metadata including the Claude model used, preset, and input type.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "Text or JSON string to classify"
  },
  "preset": {
   "enum": [
    "sentiment",
    "topic",
    "intent",
    "urgency",
    "custom"
   ],
   "type": "string",
   "description": "Classification preset. Default: sentiment"
  },
  "explain": {
   "type": "boolean",
   "description": "Include reasoning string. Default: true"
  },
  "taxonomy": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Custom label list (required when preset=custom, 2–20 labels)"
  },
  "input_type": {
   "enum": [
    "text",
    "json"
   ],
   "type": "string",
   "description": "text (default) or json"
  },
  "multi_label": {
   "type": "boolean",
   "description": "Return ranked list of all labels. Default: false"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "meta": {
   "model": "claude-haiku-4-5",
   "preset": "sentiment",
   "input_type": "text",
   "multi_label": false
  },
  "label": "positive",
  "labels": [
   {
    "label": "positive",
    "confidence": 0.92
   },
   {
    "label": "neutral",
    "confidence": 0.06
   },
   {
    "label": "negative",
    "confidence": 0.02
   }
  ],
  "reasoning": "The text expresses strong satisfaction and approval with no negative indicators.",
  "confidence": 0.92
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/claude-ai-text-classifier-x402-70b1b046/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from web-production-2d1051.up.railway.app](https://www.zero.xyz/host/web-production-2d1051.up.railway.app/llms.txt)
