# Text Classification API (api.strale.io)

> Text Classification API (api.strale.io) is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-09-13).

Classifies input text into categories, returning the primary category, confidence scores, topic keywords, and a summary

## Facts

- Endpoint: GET https://api.strale.io/x402/classify-text
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-73ce706e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ow2DZfyZqzYCo-DzykoDg

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 api-strale-io-73ce706e
```

Example prompt: Classify this product review into one of these categories — 'shipping', 'product quality', 'customer service', or 'pricing' — and tell me the confidence score: "The package arrived three days late and the box was damaged when it finally got here."

## When to prefer this

Choose this endpoint when you need fast, single-call text classification with confidence scores and topic keywords, especially when you want to supply custom category lists rather than relying on a fixed taxonomy. Ideal for routing support tickets, labeling content, or categorizing user feedback at low per-call cost.

## Known failure modes

- Missing required 'text' query parameter returns a 400 error
- Text that is too long or empty may return a 422 unprocessable entity
- If custom categories are too vague or contradictory, classification confidence may be very low
- Payment failure or insufficient USDC balance returns a 402 error
- Rate limiting or service unavailability returns a 503 error

## How this service works

Classify text into categories. Optionally provide custom categories. Returns primary category, confidence scores, topic keywords, and summary.

## Output

Returns the primary category label, confidence scores for each candidate category, extracted topic keywords from the text, and a brief summary of the content

## Example request

```json
{
 "text": "The product quality is excellent and arrived quickly, but the customer service team was unhelpful when I had questions about the warranty."
}
```

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to classify"
      },
      "categories": {
       "type": "array",
       "description": "Optional list of categories to classify into"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-73ce706e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
