**Full name**: projects.locations.processors.process

Processes a single document.

### HTTP request

Choose a location:
<button value="global" default="">global</button> <button value="us">us</button> <button value="eu">eu</button> <button value="asia-south1">asia-south1</button> <button value="asia-southeast1">asia-southeast1</button> <button value="northamerica-northeast1">northamerica-northeast1</button> <button value="australia-southeast1">australia-southeast1</button> <button value="europe-west2">europe-west2</button> <button value="europe-west3">europe-west3</button>   
`POST https://documentai.googleapis.com/v1/{name}:process`

<br />

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the `https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/projects.locations.processors#Processor` or `https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/projects.locations.processors.processorVersions#ProcessorVersion` to use for processing. If a `https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/projects.locations.processors#Processor` is specified, the server will use its `https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/projects.locations.processors#Processor.FIELDS.default_processor_version`. Format: `projects/{project}/locations/{location}/processors/{processor}`, or `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` It takes the form `projects/{project}/locations/{location}/processors/{processor}`. Authorization requires one or more of the following [IAM](https://cloud.google.com/iam/docs/) permissions on the specified resource `name`: - `documentai.processors.processOnline` - `documentai.processorVersions.processOnline` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "skipHumanReview": boolean, "fieldMask": string, "processOptions": { object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/ProcessOptions`) }, "labels": { string: string, ... }, "imagelessMode": boolean, // Union field `source` can be only one of the following: "inlineDocument": { object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/Document`) }, "rawDocument": { object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/RawDocument`) }, "gcsDocument": { object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/GcsDocument`) } // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| `skipHumanReview (deprecated)` | `boolean` Whether human review should be skipped for this request. Default to `false`. |
| `fieldMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Specifies which fields to include in the `https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/ProcessResponse#FIELDS.document` output. Only supports top-level document and pages field, so it must be in the form of `{document_field_name}` or `pages.{page_field_name}`. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| `processOptions` | ``object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/ProcessOptions`)`` Inference-time options for the process API |
| `labels` | `map (key: string, value: string)` 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. |
| `imagelessMode` | `boolean` Optional. Option to remove images from the document. |
| Union field `source`. The document payload. `source` can be only one of the following: ||
| `inlineDocument` | ``object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/Document`)`` An inline document proto. |
| `rawDocument` | ``object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/RawDocument`)`` A raw document content (bytes). |
| `gcsDocument` | ``object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/GcsDocument`)`` A raw document on Google Cloud Storage. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/document-ai/docs/reference/rest/v1/ProcessResponse`.

### Authorization scopes

Requires the following OAuth scope:

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

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires **one of** the following [IAM](https://cloud.google.com/iam/docs) permissions on the `name` resource, depending on the resource type:

- `documentai.processors.processOnline`
- `documentai.processorVersions.processOnline`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).