> ## Documentation Index
> Fetch the complete documentation index at: https://www.text.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the Language Detection API

> Detect the language used in messages and other text so your integration can route conversations, choose localized responses, or analyze multilingual 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 <Icon icon="file" /> [Authorization](/docs/authentication/overview).

## Working with predictions

[Detect language](/docs/api/language-detection/language-detection/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](/docs/public/files/language-detection.json).

## Related APIs

Use the [Agent Chat API](/docs/api/agent-chat/) to retrieve conversation messages or act on the detected language in a conversation workflow.

For a broader comparison, see [Data and analytics APIs](/docs/api-overview/data-analytics-apis).
