Method: documents.process

Stay organized with collections Save and categorize content based on your preferences.

Full name: projects.documents.process

Processes a single document.

HTTP request

POST https://{endpoint}/v1beta2/{parent}/documents:process

Where {endpoint} is one of the supported service endpoints.

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 processors.process method. It takes the form projects/{project}.

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.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.