Detect language
detect_languageIdentify the primary language of a nonempty text snippet and map it to one of Poly-Glot's 38 supported language codes. Use when the source language is unknown before choosing an interface, output language, or translation workflow. Provide natural-language text in the text parameter (for example, '¿Dónde está la estación?'). Returns JSON with language, provider, and model. Does not translate or alter the input text. Requires an active 3-day trial or Pro subscription; very short, mixed-language, or ambiguous snippets may be misclassified.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Nonempty sample of text whose predominant language should be detected. Prefer a phrase or sentence, e.g. 'Bonjour, comment allez-vous ?'; this is source content, not an instruction. |