# Method: projects.locations.corpora.assets.clip

- [HTTP request](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.ClipAssetResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#body.aspect_1)
- [TimeIndexedUri](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#TimeIndexedUri)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#TimeIndexedUri.SCHEMA_REPRESENTATION)

Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after startTime and before endTime, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

### HTTP request

`POST https://visionai.googleapis.com/v1/{name=projects/*/locations/*/corpora/*/assets/*}:clip`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the asset to request clips for. Format: `projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/assets/{assetId}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "temporalPartition": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`) } } ``` |

| Fields ||
|---|---|
| `temporalPartition` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`)`` Required. The time range to request clips for. |

### Response body

Response message for assets.clip API.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "timeIndexedUris": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#TimeIndexedUri`) } ] } ``` |

| Fields ||
|---|---|
| `timeIndexedUris[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/clip#TimeIndexedUri`)`` A list of signed uris to download the video clips that cover the requested time range ordered by time. |

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `visionai.assets.clip`

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

## TimeIndexedUri

Signed uri with corresponding time range.

| JSON representation |
|---|
| ``` { "temporalPartition": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`) }, "uri": string } ``` |

| Fields ||
|---|---|
| `temporalPartition` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`)`` Time range of the video that the uri is for. |
| `uri` | `string` Signed uri to download the video clip. |