About this endpoint
What it does
Detects the language of the input text and returns the most likely language code along with a per-language probability breakdown.
Request Body
| Parameter | Type | Description |
|---|---|---|
| text | String | Input text. Maximum length: 512 characters. |
Response
Returns a JSON object with a detected string field and a probabilities array field. detected is the ISO 639-1 language code for the most likely language, and probabilities contains per-language objects with lang and prob fields.
| Parameter | Type | Description |
|---|---|---|
| detected | String | ISO 639-1 language code. |
| probabilities | Object Array | Array of per-language probability objects. |
| probabilities[].lang | String | Language code for the candidate language. |
| probabilities[].prob | Number | Probability associated with the candidate language. |



