# Language Detector / Language Identification API

> Language Detector / Language Identification API is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Detects the language of input text, returning ISO 639-1 code, full language name, confidence score, and secondary languages for mixed-language content.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/detect-language
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-ef084899
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eQ4cUnBwozJYouahUs7wB

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 x402-deployer-x402-deployer-workers-dev-ef084899 -d '<json body>'
```

Example prompt: What language is this text written in, and how confident are you? 'Bonjour, je m'appelle Marie et j'habite à Paris.' — I need the ISO 639-1 code, full language name, and confidence score, plus any secondary languages if it's mixed.

## When to prefer this

Use this endpoint when you need programmatic language identification with a confidence score and ISO 639-1 codes, especially for multilingual or mixed-language text. Ideal for routing user messages by language, pre-processing text before translation, or filtering content by language in pipelines.

## Known failure modes

- Empty or very short text may yield low confidence or ambiguous results
- Highly transliterated or code-switched text may misidentify the primary language
- Extremely rare languages may not be detected correctly or may fall back to a closest match
- Non-textual input or binary content will likely return an error or near-zero confidence

## How this service works

Language detector / language identification. ISO 639-1 code, full name, confidence (0-1). Mixed-language detection with secondary languages list. 100+ languages.

## Output

Returns the detected primary language as an ISO 639-1 code (e.g. 'fr') and full name (e.g. 'French'), a confidence score between 0 and 1, and a list of secondary languages if the text contains mixed-language content. Supports 100+ languages.

## Example request

```json
{
 "input": {
  "body": {
   "text": "Hello world, this is a test of the language detection API."
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to detect the language of. Only the first 2000 chars are sent to the model; max 10000 chars total."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "confidence": {
       "type": "number"
      },
      "language_code": {
       "type": "string"
      },
      "language_name": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

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