Documentation

API URL


POST /detect

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
{
  "text": "Ceci est un exemple de texte en français.",
  "top": 1,
  "format": "639-1"
}

Successful Response

Status
HTML
200 OK
Body
Code
{
  "languageCode": "fr",
  "languageName": "French",
  "confidence": 1
}

Error Response

Example
Code
400 INVALID_TEXT – If 'text' is missing or too short
400 INVALID_BATCH – If batch input is malformed
400 UNKNOWN_LANGUAGE – If detection fails
400 INVALID_TOP – If top > 5 or < 1

Last Updated:  May 4, 2026