> ## 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.

# Image Build Logs

> Streams the build log of an image as a text event stream.

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

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

The image ID.

**version\_id** `string`

The version whose build log to read. Absent: the latest build.

**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

The response is a **Server-Sent Events** stream (`text/event-stream`), not JSON. It first repeats the log that already came out and then follows the build live, with keep-alive heartbeats. Each `log` event carries one line of the build log as plain text. Up to 2 streams per image can be open at the same time. After the build ends, the log of the latest build and of each version stays available.

```text Response theme={null}
event: log
data: Step 1/6 : FROM node:22-slim

event: log
data: Step 2/6 : WORKDIR /srv
```

### 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`).
* `IMAGE_VERSION_NOT_FOUND`: The image has no version with that `version_id` (`404`).
* `INTERNAL_SERVER_ERROR`: Unexpected failure (`500`).

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


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