$ man classify-text
/classify-text
NAME
classify-text — sorts a piece of text into categories you define on the fly, no training or fixed label set required
SYNOPSIS
POST https://x402.agentutility.ai/classify-text
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Sorts a piece of text into categories you define on the fly, no training or fixed label set required. Send text plus labels (2 to 25 caller-supplied categories), an optional multi_label flag to allow more than one match, and optional label_descriptions to disambiguate close labels; get back results with a calibrated confidence per label, a top_label, and a one-sentence reasoning for the call. Use it as a zero-shot text classifier, text classification API, content moderation router, or category and label sorter for tickets, reviews, and inbound messages.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| text | string | Text to classify. Max 15k chars. | required |
| labels | array | Candidate labels to choose from. 2-25 items, each a non-empty string ≤80 chars. | required |
| multi_label | boolean | If true, returns every label that applies instead of just the best match. Optional; defaults to false. | optional |
| label_descriptions | object | Optional map of label name to a short description, used to guide the model. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| results | array | Array of {label, confidence}. |
| top_label | string | Highest-confidence label chosen from the caller's supplied label set. |
| reasoning | string | Short explanation of why the classifier picked the top label. |
| multi_label | boolean | True if multi-label mode was used (text can match more than one label). |
| labels | array | Array of label objects with name and calibrated confidence score, sorted by score descending. |
| input_chars | number | Character count of the input text submitted for classification. |
| model | string | Mistral model identifier used to produce the classification. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/classify-text \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the classify-text tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- classifycategorizemoderationroutingaillm
- env
- VENICE_API_KEY
- methods
- POST
- cluster
- wordmint
- price
- $0.02 USDC per call
ADJACENT — other endpoints in wordmint
| endpoint | description | price |
|---|---|---|
| alt-text-generator | Turns a public image URL into ready-to-use text: concise alt text for screen readers, a natural-language description, OCR text pulled fro… | $0.02 |
| classify | Sort text into categories you define on the spot, no training run required. | $0.02 |
| describe-image | Describes images with a vision LLM across five modes: describe, alt_text (accessibility, <=125 chars), OCR (extract visible text), tags (… | $0.02 |
| detect-pii | Detects PII in text: emails, phones, SSNs, credit cards, addresses, names, IPs, and API tokens. | $0.02 |
| email-draft | Writes emails with AI: subject, body, salutation, and sign-off. | $0.02 |
| extract | Pull structured entities out of raw text instead of hand-parsing it yourself. | $0.02 |
| image-describe | Get a vision model's read on an image: a description, alt text, extracted text, tags, or a caption. | $0.02 |
| image-description | Takes a public image URL and returns an AI vision description, alt text, OCR text, tags, or caption depending on mode. | $0.02 |
SEE ALSO