> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vertracloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Download Image Context

> Returns a temporary download URL for the current build context of an image.

The current context is the full build context of the last successful build, with `.env*` files removed. It is also the base for [commits](https://docs.vertracloud.app/guides/custom-docker-images.md#commit-on-top-of-the-current-context).

Needs the `images:read` scope when called with an API key.

**image\_id** `string` *required*

The image ID.

**workspace\_id** `string`

If the image belongs to a workspace, the workspace's ID. Required for workspace members acting on an image they don't own.

### Response

**response** `object`

**Toggle object**

**url** `string`

A temporary URL to download the current build context as a ZIP file.

```json Response theme={null}
{
  "response": {
    "url": "https://api.vertracloud.app/..."
  }
}
```

### Error Responses

**code** `string`

The error code indicating the reason for the failure. Possible values:

* `API_KEY_SCOPE_DENIED`: The API key does not have the required scope (`403`).
* `IMAGE_NOT_FOUND`: The image does not exist or you cannot access it (`404`).
* `INTERNAL_SERVER_ERROR`: Unexpected failure (`500`).

```json Error Response theme={null}
{
  "code": "IMAGE_NOT_FOUND"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.