Text Translation

HTTP request

POST /v3/translate/text

Authorization(Bearer token or API key)

OAuth2PasswordBearer

Authorization: OAuth2PasswordBearer

Header API Key

X-API-Key: <your_api_key>

Body form-data

KEY
TYPE
VALUE

text

String

Text to be translated

original_lang

String

The original language of the content. Optional but recommended for better accuracy.

dest_lang

String

The target language for translation.

process_mode

String

Describes how the file should be processed 'replace', 'append', 'append_reverse' .

style_mode

Interger

Defines the styling mode for the translation output

translate_type

String

Translate type to be used "Paraphrase", "Professional".

tone

String

New tone of the translation, if applicable

domain

String

The new domain or field of the content, which can help in choosing specialized translation models.

bilingual_text_style__font

String

Optional custom font to be used for the translation, specifying word-level translations.

bilingual_text_style__font_size

String

Optional custom font size to be used for the translation, specifying word-level translations.

bilingual_text_style__color

String

Optional custom color to be used for the translation, specifying word-level translations.

dictionary

String

Optional custom dictionary in JSON format to be used for the translation, specifying word-level translations.

custom_prompt

String

Custom prompt to be used for the translation

Response

200: Success

Response schema: application/json

KEY
VALUE

status_code

200

content

{ "data": { "task_id": "81812b70082840039e6a4baedd70e985" }, "errors": [], "error_description": "", "start_time": "yyyy-mm-dd hh-mm-ss utc+7", "end_time": "yyyy-mm-dd hh-mm-ss utc+7" }

400: Bad Request Response schema: application/json

KEY
VALUE

status_code

400

content

{ "data": {}, "errors": [ "Error" ], "error_description": "Error while sending message. Please check server!", "start_time": "yyyy-mm-dd hh-mm-ss utc+7", "end_time": "yyyy-mm-dd hh-mm-ss utc+7" }

401: Authentication Error

Response schema: application/json

KEY
VALUE

status_code

401

content

{ "detail": "Not authenticated" }

Last updated