Predict the translation of a text
Body Required
-
The text to predict
Minimum length is
3
, maximum length is1500
. -
The target language
-
source_lang string
The source language
Default value is
auto
.
POST
/translate/predict
curl \
-X POST https://api.itsrose.rest/translate/predict \
-H "Content-Type: application/json" \
-d '{"text":"Hello, world!","target_lang":"id","source_lang":"auto"}'
Request examples
{
"text": "Hello, world!",
"target_lang": "id",
"source_lang": "auto"
}
Response examples (200)
{
"status": true,
"message": "success",
"result": {
"text": "string",
"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": {}
}