Detect the language of a text

POST /translate/detect
application/json

Body Required

  • text string Required

    The text to detect

    Minimum length is 3, maximum length is 1500.

Responses

  • 200 application/json

    Default Response

    Hide response attributes Show response attributes object
    • status boolean

      Default value is true.

    • message string

      Default value is success.

    • result object

      Additional properties are allowed.

      Hide result attribute Show result attribute object
      • lang string

        The detected language

  • 400 application/json

    Invalid request error

    Hide response attributes Show response attributes object
  • 401 application/json

    Authorization error

    Hide response attributes Show response attributes object
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
POST /translate/detect
curl \
 -X POST https://api.itsrose.rest/translate/detect \
 -H "Content-Type: application/json" \
 -d '{"text":"Hello, world!"}'
Request examples
{
  "text": "Hello, world!"
}
Response examples (200)
{
  "status": true,
  "message": "success",
  "result": {
    "lang": "string"
  }
}
Response examples (400)
{
  "status": false,
  "message": "string",
  "result": {}
}
Response examples (401)
{
  "status": false,
  "message": "string",
  "result": {}
}
Response examples (500)
{
  "status": false,
  "message": "string",
  "result": {}
}