Generative AI

Translate Text

Translates the provided text from one language to another.

post/cloud/v2/universes/{universe_id}:translateText

Path parameters

universe_idstring required

The universe ID.

Request body

textstring required

The text to be translated.

sourceLanguageCodestring

The IETF BCP-47 language code representing the language of the input text.

If not provided, the system automatically detects the source language.

Supported language codes include:

  • English (en-us)
  • French (fr-fr)
  • Vietnamese (vi-vn)
  • Thai (th-th)
  • Turkish (tr-tr)
  • Russian (ru-ru)
  • Spanish (es-es)
  • Portuguese (pt-br)
  • Korean (ko-kr)
  • Japanese (ja-jp)
  • Chinese Simplified (zh-cn)
  • Chinese Traditional (zh-tw)
  • German (de-de)
  • Polish (pl-pl)
  • Italian (it-it)
  • Indonesian (id-id)
targetLanguageCodesstring[]

A list of target language codes in IETF BCP-47 format for translation.

Supported language codes include:

  • English (en-us)
  • French (fr-fr)
  • Vietnamese (vi-vn)
  • Thai (th-th)
  • Turkish (tr-tr)
  • Russian (ru-ru)
  • Spanish (es-es)
  • Portuguese (pt-br)
  • Korean (ko-kr)
  • Japanese (ja-jp)
  • Chinese Simplified (zh-cn)
  • Chinese Traditional (zh-tw)
  • German (de-de)
  • Polish (pl-pl)
  • Italian (it-it)
  • Indonesian (id-id)

Example request

{
  "text": "Hello",
  "sourceLanguageCode": "en-us"
}

Response

OK

sourceLanguageCodestring

The IETF BCP-47 language code representing the detected or user-specified language of the source text.

translationsobject

A map containing the requested translations. The key is the IETF BCP-47 language code, and the value is the translated text for that language. The map contains all requested translations.

Changes

No recorded changes to this endpoint across all 16 revisions of this API.