# Language Routing Top-k Label Coverage

> Language Routing Top-k Label Coverage 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-18).

Computes top-k label coverage metrics for a language routing classifier given up to 200 labelled text records with predicted probabilities.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-sector-ml-language-routing-top-k?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/language-routing-top-k-label-coverage-c938c756
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JpTdy1spba-QtH1Wj7B-7

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-top-k-label-coverage-c938c756 -d '<json body>'
```

Example prompt: I have 50 labelled text samples with actual and predicted language labels (english, french, spanish, other) plus the 4-class probability scores for each — can you compute the top-2 label coverage to see how often the correct language falls within the top 2 predictions?

## When to prefer this

Choose this endpoint when you need to evaluate a language routing classifier (English/French/Spanish/other) using top-k label coverage on a small labelled dataset of up to 200 records and already have predicted probability arrays. It is ideal for quick, low-cost offline evaluation without needing a hosted model or foundation model training. Prefer this over general-purpose ML evaluation tools when working specifically within the 4-class language routing domain and when per-call cost needs to stay at $0.01 USDC.

## Known failure modes

- More than 200 records supplied — request will be rejected or truncated
- Probability arrays with fewer or more than 4 elements per record
- k value outside the 1–4 range
- Missing required fields (id, text, actual, predicted, probabilities) in any record
- Label values outside the allowed enum (english, french, spanish, other)
- Malformed JSON payload
- Payment failure via x402 protocol

## How this service works

Language routing - Top-k label coverage: Top-k label coverage 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 top-k label coverage deliverable.

## Output

Returns a bounded top-k label coverage deliverable: the proportion of supplied records for which the true language label appears within the top-k ranked predicted probabilities, given the specified k (1–4) and up to 200 labelled records with actual labels, predicted labels, and 4-class probability arrays.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "k": {
   "type": "integer",
   "default": 2,
   "maximum": 4,
   "minimum": 1
  },
  "records": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "text",
     "actual",
     "predicted",
     "probabilities"
    ],
    "properties": {
     "id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "text": {
      "type": "string",
      "default": "",
      "maxLength": 1000
     },
     "actual": {
      "enum": [
       "english",
       "french",
       "spanish",
       "other"
      ],
      "type": "string"
     },
     "predicted": {
      "enum": [
       "english",
       "french",
       "spanish",
       "other"
      ],
      "type": "string"
     },
     "probabilities": {
      "type": "array",
      "items": {
       "type": "number",
       "default": 0,
       "maximum": 1,
       "minimum": 0
      },
      "default": [],
      "maxItems": 4,
      "minItems": 4
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "id": "example-0-0",
     "text": "english sample document number 0 for this supplied dataset.",
     "actual": "english",
     "predicted": "english",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-0-1",
     "text": "english sample document number 1 for this supplied dataset.",
     "actual": "english",
     "predicted": "english",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-0-2",
     "text": "english sample document number 2 for this supplied dataset.",
     "actual": "english",
     "predicted": "english",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-1-0",
     "text": "french sample document number 0 for this supplied dataset.",
     "actual": "french",
     "predicted": "french",
     "probabilities": [
      0.06666666666666667,
      0.8,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-1-1",
     "text": "french sample document number 1 for this supplied dataset.",
     "actual": "french",
     "predicted": "french",
     "probabilities": [
      0.06666666666666667,
      0.8,
      0.06666666
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/language-routing-top-k-label-coverage-c938c756/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)
