# x402 AI Tools – Language Detection

> x402 AI Tools – Language Detection is a paid API for AI agents from ai.kagurazaka.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Detects the dominant language of a text (over 100 languages) using Amazon Comprehend, analyzing up to the first 1000 characters and returning ranked language codes with confidence scores.

## Facts

- Endpoint: POST https://ai.kagurazaka.dev/v1/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/x402-ai-tools-language-detection-86e50f3a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iWs2A31U8newBgOskRm4S

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-ai-tools-language-detection-86e50f3a -d '<json body>'
```

Example prompt: Can you detect what language this text is written in? Here it is: 'Bonjour, comment puis-je vous aider aujourd'hui?'

## When to prefer this

Choose this endpoint when you need fast, automated language identification across 100+ languages backed by Amazon Comprehend's production NLP infrastructure. Ideal for preprocessing pipelines that route, tag, or translate multilingual content, and when you need confidence scores rather than a binary yes/no answer. Prefer this over translation endpoints when language identification alone is the goal, or when you need to validate that user input matches an expected locale.

## Known failure modes

- Empty or very short text may result in low-confidence or ambiguous language detection
- Text shorter than a few words may yield unreliable results
- Highly mixed-language input may split confidence across multiple languages
- Payment failure (402) if USDC balance is insufficient
- Request rejected if text field is missing or malformed JSON

## How this service works

Detects the dominant language of a text (over 100 languages) with Amazon Comprehend, from its first 1000 characters. Returns the most likely language codes with scores.

## Output

Returns an array of detected language candidates, each with an ISO 639-1 language code (e.g. 'en', 'fr', 'de') and a confidence score between 0 and 1, ordered from most to least likely. The analysis is based on the first 1000 characters of the input text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "the text; the first 1000 characters are read"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-ai-tools-language-detection-86e50f3a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai.kagurazaka.dev](https://www.zero.xyz/host/ai.kagurazaka.dev/llms.txt)
