# Losbeto /classify — Zero-Shot Text Classification

> Losbeto /classify — Zero-Shot Text Classification is a paid API for AI agents from api.losbeto.xyz, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-10).

Assigns a given text to exactly one label from a user-supplied closed set, returning the chosen label verbatim with a 0–1 confidence score, billed per call in USDC via x402.

## Facts

- Endpoint: POST https://api.losbeto.xyz/classify?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/losbeto-classify-zero-shot-text-classification-6a64bbd8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pqG2UTYBUedZoiGxRdChv

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 losbeto-classify-zero-shot-text-classification-6a64bbd8 -d '<json body>'
```

Example prompt: Classify the following support message into exactly one of these categories — billing, technical issue, feature request, or general inquiry — and tell me your confidence: 'I was charged twice for my subscription this month and need a refund.'

## When to prefer this

Use this endpoint when you need a deterministic, closed-set classification where the answer must be one of a fixed list you control — support triage, intent routing, spam detection, sentiment bucketing. Prefer it over open-ended extraction endpoints (like /extract) when you don't want free-form tags. It's especially suitable for agent pipelines that need no API keys or account setup and can pay per-call in USDC on Base, Polygon, Solana, or Algorand.

## Known failure modes

- Text exceeds 6000 characters — request rejected
- Fewer than 2 or more than 30 labels provided — validation error
- Model returns label not in candidate set — payment refunded as credit
- Insufficient USDC balance or payment failure — 402 response, call not executed
- Malformed request body missing 'text' or 'labels' — 400 error

## How this service works

Assign text to exactly one label from a closed set you provide — support triage, intent routing, spam/not-spam, sentiment buckets. The answer is always one of your labels, copied verbatim, with a 0-1 confidence; if th...

## Output

A JSON object containing the chosen label (copied verbatim from the candidate list provided) and a 0–1 confidence float. If the model returns anything outside the provided label set, the payment is credited back as call credit. No open-ended tags or free-text answers are produced.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "method": {
     "type": "string",
     "description": "POST"
    },
    "bodyParams": {
     "type": "object",
     "required": [
      "text",
      "labels"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to classify (max 6000 chars)."
      },
      "labels": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "2-30 candidate labels; the answer is always one of them."
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "description": "Assign text to exactly one label from a closed set you provide — support triage, intent routing, spam/not-spam, sentiment buckets. The answer is always one of your labels, copied verbatim, with a 0-1 confidence; if the model returns anything else the payment is returned as call credit. Do NOT use for open-ended tagging — that is /extract."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/losbeto-classify-zero-shot-text-classification-6a64bbd8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.losbeto.xyz](https://www.zero.xyz/host/api.losbeto.xyz/llms.txt)
