---
title: "POST /v3/{+parent}:batchTranslateText"
method: POST
path: "/v3/{+parent}:batchTranslateText"
tags: ["projects"]
---

# POST /v3/{+parent}:batchTranslateText

`POST /v3/{+parent}:batchTranslateText`

Translates a large volume of text in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.

## Path parameters

- `parent` string, required

## Request body

- BatchTranslateTextRequest — The batch translation request.
  - `models` object — Optional. The models to use for translation. Map's key is target language code. Map's value is model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.
  - `inputConfigs` InputConfig[] — Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
    - `mimeType` string — Optional. Can be "text/plain" or "text/html". For `.tsv`, "text/html" is used if mime_type is missing. For `.html`, this field must be "text/html" or empty. For `.txt`, this field must be "text/plain" or empty.
    - `gcsSource` GcsSource — The Google Cloud Storage location for the input content.
      - `inputUri` string — Required. Source data URI. For example, `gs://my_bucket/my_object`.
  - `glossaries` object — Optional. Glossaries to be applied for translation. It's keyed by target language code.
  - `targetLanguageCodes` string[] — Required. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
  - `sourceLanguageCode` string — Required. Source language code. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
  - `outputConfig` OutputConfig — Output configuration for BatchTranslateText request.
    - `gcsDestination` GcsDestination — The Google Cloud Storage location for the output content.
      - `outputUriPrefix` string — Required. The bucket used in 'output_uri_prefix' must exist and there must be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with "/" and start with "gs://". One 'output_uri_prefix' can only be used by one batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error is returned.
  - `labels` object — Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/translate.md) · [All operations](https://skmtc.dev/google/apis/translate/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/translate/revisions/1597c11ae5de/schema)
