# Language Routing — Train Local Text Baseline and Classify

> Language Routing — Train Local Text Baseline and Classify is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-15).

Trains a naive-Bayes text classifier on up to 200 labelled records (english/french/spanish/other) and classifies new query texts against that local model.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-sector-ml-language-routing-local-classifier?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/language-routing-train-local-text-baseline-and-classify-252f84c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8JWbULpy9Hi4DFsEYJ4wF

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 language-routing-train-local-text-baseline-and-classify-252f84c3 -d '<json body>'
```

Example prompt: Train a local naive-Bayes language classifier on these labelled text samples — I have 12 examples (4 english, 4 french, 4 spanish) — and then classify these two new query texts: 'Bonjour le monde' and 'Hello world'.

## When to prefer this

Choose this endpoint when you need a cheap, disposable, local text classification baseline for language routing without relying on a hosted or foundation model. Ideal for small datasets (up to 200 records), rapid prototyping, or cost-sensitive pipelines where a naive-Bayes approximation is sufficient. Prefer alternatives if you need high accuracy on multilingual text, support for languages beyond english/french/spanish/other, or a persistent hosted model.

## Known failure modes

- Fewer than 2 labelled records supplied — minimum input not met
- More than 200 records provided — exceeds maximum and will be rejected
- Query texts array is empty or exceeds 20 items
- Text fields exceed 1000 characters — truncation or rejection
- Only one class present in training data — classifier cannot generalise
- Payment of 0.01 USDC not attached — 402 payment required response
- Invalid label value outside enum (english/french/spanish/other)

## How this service works

Language routing - Train local text baseline and classify: Train local text baseline and classify for Language routing. Up to 200 supplied labelled text records. Local dataset tools, evaluation and small naive-Bayes baselines; no hosted model or foundation-model training. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded train local text baseline and classify deliverable.

## Output

The endpoint returns classification predictions for each query text (predicted language label from english/french/spanish/other), along with evaluation metrics for the trained naive-Bayes baseline model derived from the supplied labelled records.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "records": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "text",
     "actual"
    ],
    "properties": {
     "id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "text": {
      "type": "string",
      "default": "",
      "maxLength": 1000
     },
     "actual": {
      "enum": [
       "english",
       "french",
       "spanish",
       "other"
      ],
      "type": "string"
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "id": "example-0-0",
     "text": "english sample document number 0 for this supplied dataset.",
     "actual": "english"
    },
    {
     "id": "example-0-1",
     "text": "english sample document number 1 for this supplied dataset.",
     "actual": "english"
    },
    {
     "id": "example-0-2",
     "text": "english sample document number 2 for this supplied dataset.",
     "actual": "english"
    },
    {
     "id": "example-1-0",
     "text": "french sample document number 0 for this supplied dataset.",
     "actual": "french"
    },
    {
     "id": "example-1-1",
     "text": "french sample document number 1 for this supplied dataset.",
     "actual": "french"
    },
    {
     "id": "example-1-2",
     "text": "french sample document number 2 for this supplied dataset.",
     "actual": "french"
    },
    {
     "id": "example-2-0",
     "text": "spanish sample document number 0 for this supplied dataset.",
     "actual": "spanish"
    },
    {
     "id": "example-2-1",
     "text": "spanish sample document number 1 for this supplied dataset.",
     "actual": "spanish"
    },
    {
     "id": "example-2-2",
     "text": "spanish sample document number 2 for this supplied dataset.",
     "actual": "spanish"
    },
    {
     "id": "example-3-0",
     "text": "other sample document number 0 for this supplied dataset.",
     "actual": "other"
    },
    {
     "id": "example-3-1",
     "text": "other sample document number 1 for this supplied dataset.",
     "actual": "other"
    },
    {
     "id": "example-3-2",
     "text": "other sample document number 2 for this supplied dataset.",
     "actual": "other"
    }
   ],
   "maxItems": 200,
   "minItems": 2
  },
  "query_texts": {
   "type": "array",
   "items": {
    "type": "string",
    "default": "",
    "maxLength": 1000
   },
   "default": [
    "english sample"
   ],
   "maxItems": 20,
   "minIte
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/language-routing-train-local-text-baseline-and-classify-252f84c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
