Text Classification

Sort text into categories, your own or general ones. Returns the main category, confidence scores, topic keywords and a summary.

Pay by wallet (x402) AI-generated classify-text

Example

Example answer
{
  "summary": "A statement describing sample text used for validating automated testing capabilities and system functionality.",
  "confidence": 0.85,
  "all_categories": [
    {
      "category": "Software Testing",
      "confidence": 0.85
    },
    {
      "category": "Quality Assurance",
      "confidence": 0.72
    },
    {
      "category": "Technical Documentation",
      "confidence": 0.58
    },
    {
      "category": "Automation",
      "confidence": 0.65
    }
  ],
  "topic_keywords": [
    "test input",
    "automated testing",
    "capability testing",
    "QA"
  ],
  "primary_category": "Software Testing",
  "detected_language": "English"
}

Inputs

FieldTypeRequiredWhat it is
textstringYesText to classify
categoriesarrayNoOptional list of categories to classify into

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
confidencenumberAlways (present in every successful answer)
all_categoriesarrayAlways (present in every successful answer)
topic_keywordsarrayAlways (present in every successful answer)
primary_categorystringAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "classify-text",
    "inputs": {
      "text": "This is a test input for automated capability testing."
    },
    "max_price_cents": 5
  }'

Limitations

  • Ambiguous text can be assigned to the wrong category

    AI-powered classification — ambiguous text may be assigned to multiple categories or the wrong category without sufficient context

    What to do instead: Provide the complete list of valid categories and a brief description of each in the input for more accurate classification

Related tools