# Method: files.asyncBatchAnnotate

- [HTTP request](https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#body.HTTP_TEMPLATE)
- [Request body](https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#body.response_body)
- [Authorization Scopes](https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#body.aspect)
- [AsyncAnnotateFileRequest](https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#AsyncAnnotateFileRequest)
  - [JSON representation](https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#AsyncAnnotateFileRequest.SCHEMA_REPRESENTATION)

Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).

### HTTP request

`POST https://vision.googleapis.com/v1p4beta1/files:asyncBatchAnnotate`

The URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.

### Request body

The request body contains data with the following structure:

| JSON representation ||
|---|---|
| ``` { "requests": [ { object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#AsyncAnnotateFileRequest`) } ] } ``` |

| Fields ||
|---|---|
| `requests[]` | ``object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/files/asyncBatchAnnotate#AsyncAnnotateFileRequest`)`` Individual async file annotation requests for this batch. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/vision/product-search/docs/reference/rest/Shared.Types/Operation`.

### Authorization Scopes

Requires one of the following OAuth scopes:

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

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

## AsyncAnnotateFileRequest

An offline file annotation request.

| JSON representation ||
|---|---|
| ``` { "inputConfig": { object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/InputConfig`) }, "features": [ { object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/Feature`) } ], "imageContext": { object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/ImageContext`) }, "outputConfig": { object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/OutputConfig`) } } ``` |

| Fields ||
|---|---|
| `inputConfig` | ``object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/InputConfig`)`` Required. Information about the input file. |
| `features[]` | ``object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/Feature`)`` Required. Requested features. |
| `imageContext` | ``object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/ImageContext`)`` Additional context that may accompany the image(s) in the file. |
| `outputConfig` | ``object (`https://docs.cloud.google.com/vision/product-search/docs/reference/rest/v1p4beta1/OutputConfig`)`` Required. The desired output location and metadata (e.g. format). |