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

# POST /v3/{+parent}:batchTranslateDocument

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

Translates a large volume of document 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

- BatchTranslateDocumentRequest — The BatchTranslateDocument request.
  - `customizedAttribution` string — Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos
  - `inputConfigs` BatchDocumentInputConfig[] — Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
    - `gcsSource` GcsSource — The Google Cloud Storage location for the input content.
      - `inputUri` string — Required. Source data URI. For example, `gs://my_bucket/my_object`.
  - `models` object — Optional. The models to use for translation. Map's key is target language code. Map's value is the 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.
  - `formatConversions` object — Optional. The file format conversion map that is applied to all input files. The map key is the original mime_type. The map value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.
  - `sourceLanguageCode` string — Required. The ISO-639 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
  - `outputConfig` BatchDocumentOutputConfig — Output configuration for BatchTranslateDocument 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.
  - `pdfNativeOnly` boolean — Optional. If true, only native pdf pages will be translated.
  - `targetLanguageCodes` string[] — Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
  - `glossaries` object — Optional. Glossaries to be applied. It's keyed by target language code.
  - `enableShadowRemovalNativePdf` boolean — Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when is_translate_native_pdf_only: false && pdf_native_only: false
  - `enableRotationCorrection` boolean — Optional. If true, enable auto rotation correction in DVS.

## 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)
