# x402node Language Detection

> x402node Language Detection is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-14).

Detects the language of any text input and returns an ISO 639-3 language code with confidence score, supporting 80+ languages.

## Facts

- Endpoint: GET https://api.x402node.dev/text/lang-detect
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-81816959
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X0ozRcRgbPihc0L4J2taB

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 api-x402node-dev-81816959
```

Example prompt: What language is this text written in, and how confident are you? — 'Bonjour, je m'appelle Marie et j'habite à Paris.'

## When to prefer this

Use this endpoint when you need fast, per-call language identification of arbitrary text with an ISO 639-3 code and confidence score — especially useful in multilingual AI pipelines, content routing systems, or translation preprocessing where you need a standardized language tag rather than a human-readable label.

## Known failure modes

- Very short text (1-2 characters) may yield low confidence or unreliable detection
- Mixed-language text may return the dominant language but with reduced confidence
- Unknown or constructed languages not in the 80+ supported set may return a closest match with low confidence
- Empty or whitespace-only input may return an error or null language code
- Heavily romanized or transliterated text may be misclassified

## How this service works

language detect, detect language, identify language, language identifier, language detection, language detector, langdetect, ISO 639-3 language code. Detect language of any text. Returns ISO 639-3 code with confidence. Supports 80 plus languages. For AI agents handling multilingual text, content routing, translation pipelines. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object with the detected ISO 639-3 language code (e.g. 'fra' for French), a confidence score between 0 and 1, an array of alternative language candidates with their own confidence scores, and the sample length used for detection.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Input text (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-81816959/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
