---
title: "POST /v1/{+name}:batchProcess"
method: POST
path: "/v1/{+name}:batchProcess"
tags: ["projects"]
---

# POST /v1/{+name}:batchProcess

`POST /v1/{+name}:batchProcess`

LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.

## Path parameters

- `name` string, required

## Request body

- GoogleCloudDocumentaiV1BatchProcessRequest — Request message for BatchProcessDocuments.
  - `documentOutputConfig` GoogleCloudDocumentaiV1DocumentOutputConfig — Config that controls the output of documents. All documents will be written as a JSON file.
    - `gcsOutputConfig` GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig — The configuration used when outputting documents.
      - `gcsUri` string — The Cloud Storage uri (a directory) of the output.
      - `fieldMask` string, google-fieldmask — Specifies which fields to include in the output documents. Only supports top level document and pages field so it must be in the form of `{document_field_name}` or `pages.{page_field_name}`.
      - `shardingConfig` GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfigShardingConfig — The sharding config for the output document.
        - `pagesPerShard` integer — The number of pages per shard.
        - `pagesOverlap` integer — The number of overlapping pages between consecutive shards.
  - `skipHumanReview` boolean — Whether human review should be skipped for this request. Default to `false`.
  - `processOptions` GoogleCloudDocumentaiV1ProcessOptions — Options for Process API
    - `ocrConfig` GoogleCloudDocumentaiV1OcrConfig — Config for Document OCR.
      - `premiumFeatures` GoogleCloudDocumentaiV1OcrConfigPremiumFeatures — Configurations for premium OCR features.
        - `computeStyleInfo` boolean — Turn on font identification model and return font style information.
        - `enableSelectionMarkDetection` boolean — Turn on selection mark detector in OCR engine. Only available in OCR 2.0 (and later) processors.
        - `enableMathOcr` boolean — Turn on the model that can extract LaTeX math formulas.
      - `enableNativePdfParsing` boolean — Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.
      - `advancedOcrOptions` string[] — A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
      - `enableSymbol` boolean — Includes symbol level OCR information if set to true.
      - `disableCharacterBoxesDetection` boolean — Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0 (and later) processors.
      - `hints` GoogleCloudDocumentaiV1OcrConfigHints — Hints for OCR Engine
        - `languageHints` string[] — List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong).
      - `enableImageQualityScores` boolean — Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR responses are of poor quality for a given input. Adds additional latency comparable to regular OCR to the process call.
      - `computeStyleInfo` boolean — Turn on font identification model and return font style information. Deprecated, use PremiumFeatures.compute_style_info instead.
    - `schemaOverride` GoogleCloudDocumentaiV1DocumentSchema — The schema defines the output of the processed document by a processor.
      - `documentPrompt` string — Optional. Document-level prompt provided by the user. This custom text is injected into the AI model's prompt to provide extra, document-wide guidance for processing.
      - `description` string — Description of the schema.
      - `entityTypes` GoogleCloudDocumentaiV1DocumentSchemaEntityType[] — Entity types of the schema.
        - `enumValues` GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues — Defines the a list of enum values.
          - `values` string[] — The individual values that this enum values type can include.
        - `name` string — Name of the type. It must be unique within the schema file and cannot be a "Common Type". The following naming conventions are used: - Use `snake_casing`. - Name matching is case-sensitive. - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility, internal infrastructure and tooling can handle any ASCII character.) - The `/` is sometimes used to denote a property of a type. For example, `line_item/amount`. This convention is deprecated, but will still be honored for backward compatibility.
        - `properties` GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty[] — Description the nested structure, or composition of an entity.
          - `occurrenceType` 'OCCURRENCE_TYPE_UNSPECIFIED' | 'OPTIONAL_ONCE' | 'OPTIONAL_MULTIPLE' | 'REQUIRED_ONCE' | 'REQUIRED_MULTIPLE' — Occurrence type limits the number of instances an entity type appears in the document.
          - `displayName` string — User defined name for the property.
          - `valueType` string — A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field.
          - `method` 'METHOD_UNSPECIFIED' | 'EXTRACT' | 'DERIVE' | 'RELAXED_EXTRACT' — Specifies how the entity's value is obtained.
          - `name` string — The name of the property. Follows the same guidelines as the EntityType name.
        - `baseTypes` string[] — The entity type that this type is derived from. For now, one and only one should be set.
        - `displayName` string — User defined name for the type.
      - `displayName` string — Display name to show users.
      - `metadata` GoogleCloudDocumentaiV1DocumentSchemaMetadata — Metadata for global schema behavior.
        - `documentSplitter` boolean — If true, a `document` entity type can be applied to subdocument (splitting). Otherwise, it can only be applied to the entire document (classification).
        - `skipNamingValidation` boolean — If set, this will skip the naming format validation in the schema. So the string values in `DocumentSchema.EntityType.name` and `DocumentSchema.EntityType.Property.name` will not be checked.
        - `documentAllowMultipleLabels` boolean — If true, on a given page, there can be multiple `document` annotations covering it.
        - `prefixedNamingOnProperties` boolean — If set, all the nested entities must be prefixed with the parents.
    - `layoutConfig` GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig — Serving config for layout parser processor.
      - `returnBoundingBoxes` boolean — Optional. Whether to include bounding boxes in layout parser processor response.
      - `enableTableAnnotation` boolean — Optional. Whether to include table annotations in layout parser response.
      - `chunkingConfig` GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig — Serving config for chunking.
        - `chunkSize` integer — Optional. The chunk sizes to use when splitting documents, in order of level.
        - `includeAncestorHeadings` boolean — Optional. Whether or not to include ancestor headings when splitting.
      - `enableImageAnnotation` boolean — Optional. Whether to include image annotations in layout parser response.
      - `returnImages` boolean — Optional. Whether to include images in layout parser processor response.
    - `individualPageSelector` GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector — A list of individual page numbers.
      - `pages` integer[] — Optional. Indices of the pages (starting from 1).
    - `fromStart` integer — Only process certain pages from the start. Process all if the document has fewer pages.
    - `fromEnd` integer — Only process certain pages from the end, same as above.
  - `inputDocuments` GoogleCloudDocumentaiV1BatchDocumentsInputConfig — The common config to specify a set of documents used as input.
    - `gcsPrefix` GoogleCloudDocumentaiV1GcsPrefix — Specifies all documents on Cloud Storage with a common prefix.
      - `gcsUriPrefix` string — The URI prefix.
    - `gcsDocuments` GoogleCloudDocumentaiV1GcsDocuments — Specifies a set of documents on Cloud Storage.
      - `documents` GoogleCloudDocumentaiV1GcsDocument[] — The list of documents.
        - `gcsUri` string — The Cloud Storage object uri.
        - `mimeType` string — An IANA MIME type (RFC6838) of the content.
  - `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) and 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.

## Response `200`

Successful response

---

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