Skip to main content
The Language Detection API analyzes text and returns ranked language predictions. It identifies the language of a message or document but does not translate the submitted text.

Before you start

For access requirements, see Authorization.

Working with predictions

Detect language ranks predictions by probability. A probability indicates how likely the submitted text matches a language; it does not indicate how much of the text uses that language. Use max_predictions to return alternative matches and threshold to exclude low-confidence results. See the supported language codes and names. Use the Agent Chat API to retrieve conversation messages or act on the detected language in a conversation workflow. For a broader comparison, see Data and analytics APIs.