Method: projects.locations.documents.batchProcess

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

HTTP request

POST https://documentai.googleapis.com/v1beta2/{parent=projects/*/locations/*}/documents:batchProcess

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Target project and location to make a call.

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

If no location is specified, a region will be chosen automatically.

Request body

The request body contains data with the following structure:

JSON representation
{
  "requests": [
    {
      object (ProcessDocumentRequest)
    }
  ]
}
Fields
requests[]

object (ProcessDocumentRequest)

Required. Individual requests for each document.

Response body

If successful, the response body contains an instance of Operation.

ProcessDocumentRequest

Request to process one document.

JSON representation
{
  "parent": string,
  "inputConfig": {
    object (InputConfig)
  },
  "outputConfig": {
    object (OutputConfig)
  },
  "documentType": string,
  "tableExtractionParams": {
    object (TableExtractionParams)
  },
  "formExtractionParams": {
    object (FormExtractionParams)
  },
  "entityExtractionParams": {
    object (EntityExtractionParams)
  },
  "ocrParams": {
    object (OcrParams)
  },
  "automlParams": {
    object (AutoMlParams)
  }
}
Fields
parent

string

Target project and location to make a call.

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

If no location is specified, a region will be chosen automatically. This field is only populated when used in documents.process method.

inputConfig

object (InputConfig)

Required. Information about the input file.

outputConfig

object (OutputConfig)

The desired output location. This field is only needed in BatchProcessDocumentsRequest.

documentType

string

Specifies a known document type for deeper structure detection. Valid values are currently "general" and "invoice". If not provided, "general"\ is used as default. If any other value is given, the request is rejected.

tableExtractionParams

object (TableExtractionParams)

Controls table extraction behavior. If not specified, the system will decide reasonable defaults.

formExtractionParams

object (FormExtractionParams)

Controls form extraction behavior. If not specified, the system will decide reasonable defaults.

entityExtractionParams

object (EntityExtractionParams)

Controls entity extraction behavior. If not specified, the system will decide reasonable defaults.

ocrParams

object (OcrParams)

Controls OCR behavior. If not specified, the system will decide reasonable defaults.

automlParams

object (AutoMlParams)

Controls AutoML model prediction behavior. AutoMlParams cannot be used together with other Params.