API URL
POST /detect
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
text
required
string
Text input to analyze
top
optional
integer
Number of top language guesses to return (1-5)
format
optional
string
Output format: 639-3 (default) or 639-1
Content-Type
required
string
Must be "application/json" for POST requests
x-correlation-id
optional
string
Request tracking identifier for logging
Example Request
Code
{
"text": "Ceci est un exemple de texte en français.",
"top": 1,
"format": "639-1"
}Successful Response
Status
HTML
200 OKBody
Code
{
"languageCode": "fr",
"languageName": "French",
"confidence": 1
}Field
Type
Description
correlationId
string
guesses[].languageCode | string | Alternative language ISO code for comprehensive multilingual content management
format
string
guesses[].confidence | number | Probability score for each language alternative enabling intelligent content routing decisions
stats
object
—
stats.textLength
integer
—
stats.candidatesFound
integer
—
stats.topResults
integer
—
languageCode
string
ISO 639-1/639-3 language identifier for automated content routing and localization workflows
languageName
string
Human-readable language name for user interface display and content management systems
confidence
number
Detection accuracy score (0-1 scale) for quality assurance in automated language processing
iso639_3
string
—
iso639_1
string
—
candidates
array
—
candidates[].languageCode
string
—
candidates[].languageName
string
—
candidates[].confidence
number
—
candidates[].iso639_3
string
—
candidates[].iso639_1
string
—
results
array
—
results[].id
string
—
results[].language
object
—
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 < 1Last Updated: May 4, 2026