# Buckets

Neon Management API — Buckets endpoints.

---

> API Reference / Buckets / List buckets on the branch

## GET /projects/{project_id}/branches/{branch_id}/buckets

Lists branchable object-storage buckets visible on the specified branch,
including those inherited from ancestor branches.

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID

### Response (200)

- `buckets` (array, optional)
  - `name` (string, required)
    The bucket name (unique within a branch).
  - `access_level` (string, required)
    Controls anonymous access to objects in the bucket.
    - `private`: all reads and writes require authenticated requests (default).
    - `public_read`: anonymous `GetObject`/`HeadObject` requests succeed; listing,
      writes, and deletes still require authenticated requests.
    
    Possible values: `private`, `public_read`
  - `created_at` (string, required, format: date-time)
    When the bucket was created. For a bucket inherited from an
    ancestor branch this is the ancestor's creation time (the branch
    fork never re-creates the bucket).
    

### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets" \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.listProjectBranchBuckets({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID
  }
});
```

### Errors

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

---

> API Reference / Buckets / Create a bucket on the branch

## POST /projects/{project_id}/branches/{branch_id}/buckets

Creates a new branchable object-storage bucket on the specified branch.
Buckets are managed by the Neon Platform branchable-storage service.

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID

### Request body

- `name` (string, required)
  The bucket name.
- `access_level` (string, optional)
  Access level for the bucket. Defaults to `private`. Set to `public_read`
  to allow anonymous `GetObject`/`HeadObject` on objects in this bucket.
  
  Possible values: `private`, `public_read`
  Default: `private`

### Response (201)

- `bucket` (object, optional)
  - `name` (string, required)
    The bucket name (unique within a branch).
  - `access_level` (string, required)
    Controls anonymous access to objects in the bucket.
    - `private`: all reads and writes require authenticated requests (default).
    - `public_read`: anonymous `GetObject`/`HeadObject` requests succeed; listing,
      writes, and deletes still require authenticated requests.
    
    Possible values: `private`, `public_read`
  - `created_at` (string, required, format: date-time)
    When the bucket was created. For a bucket inherited from an
    ancestor branch this is the ancestor's creation time (the branch
    fork never re-creates the bucket).
    

### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets" \
  -X POST \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.createProjectBranchBucket({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID
  }
});
```

### Errors

**410**
The project has been deleted
- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

---

> API Reference / Buckets / Delete a bucket on the branch

## DELETE /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}

Deletes the named bucket from the specified branch.

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID
- `bucket_name` (string, path, required)
  The bucket name

### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets/$BUCKET_NAME" \
  -X DELETE \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.deleteProjectBranchBucket({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID,
    bucket_name: process.env.BUCKET_NAME
  }
});
```

### Errors

**404**
Bucket not found
- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

---

> API Reference / Buckets / List objects in a bucket

## GET /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects

Lists objects visible in the named bucket on the specified branch,
including those inherited from ancestor branches. Listing is served by
the user's session (no customer S3 credentials required).

When `delimiter` is supplied (typically `/`), keys are collapsed into
common prefixes (`folders`) so callers can render a folder-style
browser; keys that do not contain the delimiter after `prefix` are
returned as `objects`.

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID
- `bucket_name` (string, path, required)
  The bucket name
- `prefix` (string, query, optional)
  Only list objects whose key starts with this prefix.
- `delimiter` (string, query, optional)
  Collapse keys sharing a common prefix up to the first occurrence of
  this delimiter (typically `/`) into the `folders` array.
  
- `cursor` (string, query, optional)
  Opaque pagination cursor returned as `next_cursor` by a previous
  call. Resume listing after the last item of the previous page.
  
- `limit` (integer, query, optional)
  Maximum number of items (objects + folders) to return.
  Default: `1000`

### Response (200)

- `folders` (array, optional)
  Common prefixes (folder names) collapsed under the requested
  `delimiter`. Empty when no `delimiter` was supplied.
  
- `objects` (array, optional)
  Objects whose keys did not collapse into a folder.
  - `key` (string, required)
    The full object key.
  - `size` (integer, required, format: int64)
    The object size in bytes.
  - `last_modified` (string, required, format: date-time)
    The time the object was last modified.
  - `etag` (string, required)
    The object's entity tag (content hash).
- `prefix` (string, optional)
  The prefix that was applied to this listing (echoed back).
- `next_cursor` (string, optional)
  Pagination cursor to pass as `cursor` on the next request. Empty
  when the listing is not truncated.
  
- `is_truncated` (boolean, optional)
  True when more results exist beyond this page.

### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets/$BUCKET_NAME/objects" \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.listProjectBranchBucketObjects({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID,
    bucket_name: process.env.BUCKET_NAME
  }
});
```

### Errors

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

---

> API Reference / Buckets / Delete an object in a bucket

## DELETE /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}

Deletes the named object from the bucket on the specified branch.
Served by the user's session (no customer S3 credentials required).

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID
- `bucket_name` (string, path, required)
  The bucket name
- `object_key` (string, path, required)
  The object key. Keys may contain `/`; the `/` characters of nested
  keys must be percent-encoded (`%2F`) in the path segment.
  

### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets/$BUCKET_NAME/objects/$OBJECT_KEY" \
  -X DELETE \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.deleteProjectBranchBucketObject({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID,
    bucket_name: process.env.BUCKET_NAME,
    object_key: process.env.OBJECT_KEY
  }
});
```

### Errors

**404**
Object not found
- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

---

> API Reference / Buckets / Download an object's bytes

## GET /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/download

Streams the raw bytes of the named object from the bucket on the
specified branch, including objects inherited from ancestor branches.
Served by the user's session (no customer S3 credentials required).

The body is returned as `application/octet-stream` so a browser treats
it as a download; the `Content-Length` and `ETag` response headers echo
the stored object metadata.

BINARY-STREAM EXCEPTION TO THE BUILD-GENERATED-TYPES RULE (#7029): the
successful 200 body is the raw object stream, proxied verbatim from the
platform storage admin endpoint. It is modeled as an
`application/octet-stream` binary body (not a JSON response schema) and
is streamed without buffering the whole object in memory. Error
responses still use the generated `GeneralError` shape.

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID
- `bucket_name` (string, path, required)
  The bucket name
- `object_key` (string, path, required)
  The object key. Keys may contain `/`; the `/` characters of nested
  keys must be percent-encoded (`%2F`) in the path segment.
  

### Response (200)

The object's raw bytes, streamed verbatim. `Content-Length` and
`ETag` headers are set from the stored object metadata;
`X-Content-Type-Options` and `Content-Disposition` harden the
browser against the caller-controlled bytes.


### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets/$BUCKET_NAME/objects/$OBJECT_KEY/download" \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.getProjectBranchBucketObject({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID,
    bucket_name: process.env.BUCKET_NAME,
    object_key: process.env.OBJECT_KEY
  }
});
```

### Errors

**404**
Object not found
- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

---

> API Reference / Buckets / Delete every object under a key prefix (folder) in a bucket

## DELETE /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefix

Soft-deletes every object on the specified branch whose key starts with
`prefix`, in a single call. Intended to back a "delete folder" action in
an object browser: a `prefix` of `app/avatars/` removes every object
beneath that folder. Served by the user's session (no customer S3
credentials required).

`prefix` must be non-empty, end with `/`, be at most 1024 bytes, and
contain no control characters - a partial-segment prefix cannot
accidentally delete sibling keys. Returns the number of objects
soft-deleted (`deleted`), which may be 0 when no live object matched the
prefix on this branch.

Only objects physically present on this branch are tombstoned; objects
inherited from an ancestor branch via copy-on-write (not materialized on
this branch) are out of scope.

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID
- `bucket_name` (string, path, required)
  The bucket name
- `prefix` (string, query, required)
  The key prefix (folder) to delete. Must be non-empty and end with
  `/`. Every object on this branch whose key starts with this prefix
  is soft-deleted.
  

### Response (200)

- `deleted` (integer, optional, format: int64)
  The number of objects soft-deleted under the prefix. 0 when no live
  object matched the prefix on this branch.
  

### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets/$BUCKET_NAME/objects-by-prefix?prefix=$PREFIX" \
  -X DELETE \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.deleteProjectBranchBucketObjectsByPrefix({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID,
    bucket_name: process.env.BUCKET_NAME
  },
  query: {
    prefix: process.env.PREFIX
  }
});
```

### Errors

**404**
Bucket not found
- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

---

> API Reference / Buckets / Presign an upload or download for an object in a bucket

## POST /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign

Returns a presigned URL that transfers bytes directly to or from the
object's bucket on the specified branch, without the caller ever
handling S3 credentials. The `operation` field selects the direction:

- `upload` returns a presigned `PUT` URL (the caller `PUT`s the file
  bytes straight to `url` with the returned `headers`). Authorized with
  project write access.
- `download` returns a presigned `GET` URL (the caller `GET`s the
  bytes straight from `url`). Authorized with project read access.

The platform mints a short-lived credential and builds the SigV4-signed
URL against the branch's S3 data-plane host, returning it together with
the HTTP method, any headers the caller must echo, and the URL's expiry.

Served by the user's session (no customer S3 credentials required).

**Note**: This endpoint is currently in Private Beta.


### Parameters

- `project_id` (string, path, required)
  The Neon project ID
- `branch_id` (string, path, required)
  The Neon branch ID
- `bucket_name` (string, path, required)
  The bucket name
- `object_key` (string, path, required)
  The object key. Keys may contain `/`; the `/` characters of nested
  keys must be percent-encoded (`%2F`) in the path segment.
  

### Request body

- `operation` (string, required)
  The transfer direction. `upload` returns a presigned `PUT` URL;
  `download` returns a presigned `GET` URL.
  
  Possible values: `upload`, `download`
- `content_type` (string, optional)
  The `Content-Type` to bind into the signed request. Only meaningful
  for `upload`: when set, the caller MUST send the same `Content-Type`
  header on the `PUT`, and the value is echoed back in the response
  `headers`. Ignored for `download`.
  
- `expires_in_seconds` (integer, optional, format: int64)
  How long the presigned URL stays valid, in seconds. Defaults to 900
  (15 minutes); capped at 604800 (7 days).
  
  Default: `900`

### Response (200)

- `url` (string, optional)
  The presigned URL. Transfer the object bytes by issuing
  `method url` with the returned `headers`.
  
- `method` (string, optional)
  The HTTP method to use against `url`: `PUT` for an upload,
  `GET` for a download.
  
- `headers` (object, optional)
  Headers the caller MUST send verbatim on the request (e.g.
  `Content-Type` when it was signed on an upload). May be empty.
  
- `expires_at` (string, optional, format: date-time)
  When the presigned URL stops being valid.

### Code examples

```bash
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/buckets/$BUCKET_NAME/objects/$OBJECT_KEY/presign" \
  -X POST \
  -H "Authorization: Bearer $NEON_API_KEY"
```

```typescript
import { createNeonClient, raw } from '@neon/sdk';

const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY });
const { data } = await raw.presignProjectBranchBucketObject({
  client: neon.client,
  path: {
    project_id: process.env.PROJECT_ID,
    branch_id: process.env.BRANCH_ID,
    bucket_name: process.env.BUCKET_NAME,
    object_key: process.env.OBJECT_KEY
  }
});
```

### Errors

**404**
Bucket or branch not found
- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message

**default**
General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code,
and whether a response was received.

- If no response is returned from the API, a network error or timeout likely occurred.
- In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.
The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.

Any request that returns a `503 Service Unavailable` response is always safe to retry.

Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

- `request_id` (string, optional)
  Unique identifier for the request, useful for debugging.
  You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
  
- `code` (string, required)
  Default: ``
- `message` (string, required)
  Error message
