Detect Language of Text

POST
https://libretranslate.com/detect

Body

application/x-www-form-urlencoded
qstringrequired

Text to detect

Example
What language is this?
api_keystring

API key

Example
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Response

Detections

Response fields application/json
Show child attributes
confidencenumber<float>[0, 100]

Confidence value

Example
100
languagestring

Language code

Example
en
400Bad Requesterror-response

Invalid request

Response fields application/json
errorstring

Error message

403Forbiddenerror-response

Banned

Response fields application/json
errorstring

Error message

429Too Many Requestserror-slow-down

Slow down

Response fields application/json
errorstring

Reason for slow down

500Internal Server Errorerror-response

Detection error

Response fields application/json
errorstring

Error message