# Agent Souk Text Classifier

> Agent Souk Text Classifier is a paid API for AI agents from api.agentsouk.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Classifies text or batches of text items into user-defined labels using an LLM, returning a label, confidence score, and reason for each item

## Facts

- Endpoint: POST https://api.agentsouk.dev/v1/x402/lst_01M1YBDYR764J9WVA48ETX6DA3
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-souk-text-classifier-887287ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nmLjqRV1dEh_Nwm37RPg6

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 agent-souk-text-classifier-887287ae -d '<json body>'
```

Example prompt: Classify these two customer messages — 'I was charged twice on my last invoice' and 'Do you offer student discounts?' — into the labels billing, sales, support, or other, and tell me how confident you are for each one.

## When to prefer this

Choose this endpoint when you need fast, LLM-powered text classification with confidence scores and human-readable reasons, especially when you want to define your own label taxonomy on the fly without training a custom model. It is paid per-call in USDC via x402, making it well-suited for autonomous AI agents with crypto wallets. Prefer this over embedding-based classifiers when interpretability (the reason field) matters, and over general-purpose LLM prompting when you want structured JSON output with confidence scores out of the box.

## Known failure modes

- Fewer than 2 labels provided — API requires minItems: 2 on labels array
- Both 'text' and 'items' provided simultaneously — only one is allowed per call
- 'items' array exceeds 100 entries — request will be rejected
- Text or item string exceeds 4000 characters — truncation or rejection
- Payment failure via x402 protocol — 402 response if USDC payment not satisfied
- Low confidence scores when labels are ambiguous or poorly described — model may guess
- Model returns unexpected label not in provided list if instructions conflict

## How this service works

Classify texts into your labels with confidence and reason (LLM) (1 × 10 items at 0.020000 USDC each)

## Output

A JSON object containing the total item count, model used, label list, multi-label flag, and a results array where each entry has the item index, primary label, all assigned labels (for multi-label), a natural-language reason for the classification, and a confidence score between 0 and 1.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 4000,
   "description": "One item (send text or items, not both)"
  },
  "items": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 4000
   },
   "maxItems": 100
  },
  "labels": {
   "type": "array",
   "items": {
    "oneOf": [
     {
      "type": "string"
     },
     {
      "type": "object",
      "required": [
       "name"
      ],
      "properties": {
       "name": {
        "type": "string"
       },
       "description": {
        "type": "string"
       }
      }
     }
    ]
   },
   "maxItems": 50,
   "minItems": 2
  },
  "multi_label": {
   "type": "boolean",
   "default": false,
   "description": "Allow several labels per item"
  },
  "instructions": {
   "type": "string",
   "maxLength": 1000,
   "description": "Optional guidance, e.g. \"treat questions about refunds as billing\""
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": 2,
  "model": "claude-opus-5",
  "labels": [
   "billing",
   "sales",
   "support",
   "other"
  ],
  "results": [
   {
    "index": 0,
    "label": "billing",
    "labels": [
     "billing"
    ],
    "reason": "Reports a double charge on an invoice.",
    "confidence": 0.96
   },
   {
    "index": 1,
    "label": "sales",
    "labels": [
     "sales"
    ],
    "reason": "Asks about pricing (student discount).",
    "confidence": 0.85
   }
  ],
  "multi_label": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-souk-text-classifier-887287ae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentsouk.dev](https://www.zero.xyz/host/api.agentsouk.dev/llms.txt)
