Detect the language of a text (ISO 639 codes)
langThe language of a text with franc-min: ISO 639-3 and ISO 639-1 codes, the English name, confidence from 0 to 1, the script (Latin, Cyrillic, Arabic...) and the three next most likely languages. Send texts= (a JSON array of up to 20 strings) for a batch. Under 20 characters the answer is und with a note. 61 languages. Takes about 13 s; allow a 30 s timeout. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "lang"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Up to 5,000 characters | |
| texts | No | Alternative: a JSON array of up to 20 strings, e.g. ["Hallo","Merhaba"] |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| length | No | ||
| script | No | ||
| results | No | ||
| iso639_1 | No | ||
| language | No | ||
| checkedAt | No | ||
| confidence | No | ||
| alternatives | No | ||
| languageName | No |