Method: projects.locations.adaptiveMtTranslate

Translate text using Adaptive MT.

HTTP request

POST https://translate.googleapis.com/v3/{parent=projects/*/locations/*}:adaptiveMtTranslate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Location to make a regional call.

Format: projects/{project-number-or-id}/locations/{location-id}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "dataset": string,
  "content": [
    string
  ]
}
Fields
dataset

string

Required. The resource name for the dataset to use for adaptive MT. projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}

content[]

string

Required. The content of the input in string format. For now only one sentence per request is supported.

Response body

An locations.adaptiveMtTranslate response.

If successful, the response body contains data with the following structure:

JSON representation
{
  "translations": [
    {
      object (AdaptiveMtTranslation)
    }
  ],
  "languageCode": string
}
Fields
translations[]

object (AdaptiveMtTranslation)

Output only. The translation.

languageCode

string

Output only. The translation's language code.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-translation
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AdaptiveMtTranslation

An AdaptiveMt translation.

JSON representation
{
  "translatedText": string
}
Fields
translatedText

string

Output only. The translated text.