---
title: "Text translations"
method: POST
path: "/v1/textTranslations"
tags: ["Text translations"]
---

# Text translations

`POST /v1/textTranslations`

Translates the text content utilizing Phrase Language AI capabilities. Can identify the source language, if 
not provided, and translate the text to the target language. If language identification is requested, system
needs to have at least 50 characters.

## Request body

- TextTranslationsRequestV1
  - `sourceLang` LanguageV1
    - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
  - `sourceText` string, required
  - `targetLang` LanguageV1, required
    - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
  - `mtSettings` MtSettingSimplifiedV1
    - `profile` TranslationProfileRequestV1
      - `uid` string, required — UID for the translation profile

## Response `200`

Response with translations

- TextTranslationsResponseV1
  - `translatedText` string, required — Translated text
  - `sourceLang` LanguageV1, required
    - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
  - `targetLang` LanguageV1, required
    - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.

## Other responses

- `400` — Bad request
- `401` — Not authorized

---

[API](https://skmtc.net/phrase/apis/control-hub-service.md) · [All operations](https://skmtc.net/phrase/apis/control-hub-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phrase/control-hub-service/revisions/98ecac7ba2bf/schema)
