Detect the language of a text
util_languageDetect which language a text is written in (82 languages incl. English, Spanish, Arabic, Chinese, Hindi, Urdu, Russian, Portuguese, French, German, Japanese, Turkish…). Returns ISO 639-1 and 639-3 codes, English name, confidence, a reliable flag and ranked alternatives. Offline n-gram model: instant, no LLM cost. Use to route support tickets, pick a translation target, filter scraped content or reply in the user's language. Best with 20+ characters. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "util_language"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | How many candidates to return incl. the best, 1–10 (default 3) | |
| text | Yes | Text to classify (max 100,000 chars; first 5,000 used) |