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

# Get File

> Serve a stored file by its key.

Retrieve the raw contents of a stored file. This serves the file directly from R2 storage with appropriate HTTP headers.

## Endpoint

```
GET /v1/accounts/:accountId/storage/*
```

The file's storage key follows `/v1/accounts/:accountId/storage/` in the URL path.

## Authentication

**No authentication required.** Files are served publicly by their storage key.

## Response

Returns the raw file body with the following headers:

| Header           | Description            |
| ---------------- | ---------------------- |
| `Content-Type`   | The file's MIME type   |
| `ETag`           | Entity tag for caching |
| `Content-Length` | File size in bytes     |

Returns a `404` response (using the standard error envelope) if the file is not found.

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl "https://api.collab-kit.com/v1/accounts/${ACCOUNT_ID}/storage/c3003c93/uploads/screenshot.png" \
    --output screenshot.png
  ```

  ```html HTML theme={null}
  <img src="https://api.collab-kit.com/v1/accounts/${ACCOUNT_ID}/storage/c3003c93/uploads/screenshot.png" />
  ```

  ```typescript JavaScript theme={null}
  const url = `https://api.collab-kit.com/v1/accounts/${accountId}/storage/c3003c93/uploads/screenshot.png`;
  const res = await fetch(url);
  const blob = await res.blob();
  ```
</CodeGroup>
