Endpoints
Translate Text
Translates input text to the target language.
POST
/
translate
Headers
api-subscription-key
string
default: Your subscription key
Body
application/json
input
string
requiredInput text to be translated
source_language_code
enum<string>
requiredSource language code
Available options:
en-IN
target_language_code
enum<string>
requiredTarget language code
Available options:
hi-IN
, bn-IN
, kn-IN
, ml-IN
, mr-IN
, od-IN
, pa-IN
, ta-IN
, te-IN
, gu-IN
speaker_gender
enum<string>
default: FemalePlease specify the gender of the speaker for better translations. This feature is only supported for the code-mixed translation models currently.
Available options:
Male
, Female
mode
enum<string>
default: formalWhether the translation is formal or colloquial
Available options:
formal
, code-mixed
model
enum<string>
default: mayura:v1Model to be used for translation
Available options:
mayura:v1
enable_preprocessing
boolean
default: falseThis will enable custom preprocessing of the input text which can result in better translations.
Response
200 - application/json
translated_text
string
requiredTranslated text