detect_language
Detect the language of text input, returning the detected language and confidence scores. Accepts single strings or arrays of up to 128 texts for batch detection.
Instructions
Detects the language of the provided text. Returns the detected language, content type, and a list of predictions with confidence scores. Accepts a single string or an array of strings (up to 128 elements).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to detect the language of. Can be a single string or an array of strings (up to 128 elements). | |
| hint | No | Optional language code hint to guide detection (e.g., 'en-EN'). | |
| passlist | No | Optional list of language codes to restrict detection results to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | Detected language code (e.g., 'en-US') | |
| contentType | Yes | Content type of the analysed text | |
| predictions | Yes | Ranked list of candidate languages with confidence scores |