Language Detection

Detect the language of any text and receive the language name, ISO 639-1 code, and a confidence score.

Get API Key

Vue d'ensemble

Cas d'utilisation

  • Routing user messages to the correct language support team
  • Auto-translating user-generated content
  • Filtering content by language in multilingual platforms
  • Preprocessing text for NLP pipelines

Fonctionnalités

Supports 75 languages
Returns ISO 639-1 language code
Provides a confidence score between 0.0 and 1.0
Works on short phrases and full sentences

Points de terminaison de l'API

Detect Language

Identifies the language of the provided text and returns the language name, ISO 639-1 code, and confidence score.

POST
https://requiems.xyz/v1/text/detect-language

Paramètres

Nom Type Requis Description
text string Requis The text whose language should be detected.

Essayez-le

Démo en direct
Requête

The text whose language should be detected.

Champs de réponse

Champ Type Description
language string Full name of the detected language (e.g. French, English, Spanish)
code string ISO 639-1 two-letter language code (e.g. fr, en, es). Empty string when detection is unreliable.
confidence number Confidence score between 0.0 and 1.0. 0.0 is returned when the language cannot be reliably detected.

Exemples de code

curl -X POST https://requiems.xyz/v1/text/detect-language \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Bonjour, comment ça va?"}'

Réponses d'erreur

validation_failed

The text field is missing or empty.

bad_request

The request body is missing or malformed.

internal_error

Unexpected server error.

Foire aux questions