Method: projects.documents.process

Processes a single document.

HTTP request

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

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. This field is only populated when used in documents.process method.

Request body

The request body contains data with the following structure:

JSON representation
{
  "inputConfig": {
    object (InputConfig)
  },
  "outputConfig": {
    object (OutputConfig)
  },
  "documentType": string,
  "tableExtractionParams": {
    object (TableExtractionParams)
  },
  "formExtractionParams": {
    object (FormExtractionParams)
  },
  "entityExtractionParams": {
    object (EntityExtractionParams)
  },
  "ocrParams": {
    object (OcrParams)
  },
  "automlParams": {
    object (AutoMlParams)
  }
}
Fields
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.

Response body

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