# Language Detection

> Language Detection is a paid API for AI agents from bess-x402.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Detects the language of a given text from 55 possible languages, returning per-language probabilities and a reliability flag.

## Facts

- Endpoint: GET https://bess-x402.onrender.com/v1/text/language?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/language-detection-e503c465
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wYsiGeEWuJAf8UcRu4ga8

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-detection-e503c465
```

Example prompt: What language is this text written in: 'Bonjour, comment allez-vous aujourd'hui?' — give me the top language with its probability and whether the detection is reliable.

## When to prefer this

Choose this endpoint when you need fast, probabilistic language identification across a broad set of 55 languages with confidence scores and a reliability flag — especially useful for routing, tagging, or pre-processing pipelines. Prefer this over translation APIs that include language detection only as a side effect when language identification alone is the goal and cost efficiency matters at $0.002 per call.

## Known failure modes

- Very short or single-word texts may yield low reliability scores and ambiguous results
- Highly mixed-language or code-switched text may spread probability across multiple languages without a clear winner
- Texts consisting primarily of numbers, URLs, or punctuation may fail to identify any language reliably
- Empty or whitespace-only text input will likely return an error or null result
- Rare or minority languages not among the 55 supported may be misclassified as a similar supported language

## How this service works

Detect the language of a text among 55 languages, with probabilities for each candidate and a reliability flag. Use to route messages, pick a translator or tag content.

## Output

Returns a ranked list of candidate languages (up to 55) each with a language name, ISO code, and probability score, plus a top-level reliability flag indicating whether the detection is confident or ambiguous.

## 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 identify"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/language-detection-e503c465/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bess-x402.onrender.com](https://www.zero.xyz/host/bess-x402.onrender.com/llms.txt)
