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

# TunnelsClient

# `synth_ai.sdk.tunnels`

Managed tunnels SDK — expose local containers to Synth via tunnel leases.

Access via `SynthClient().tunnels`.

## Classes

### `TunnelProvider`

Supported third-party tunnel providers.

### `TunnelsClient`

Create and manage tunnels that forward traffic to local services.

**Methods:**

#### `health`

```python theme={null}
health(self) -> dict[str, Any]
```

Return tunnel service health for the configured backend.

#### `list`

```python theme={null}
list(self) -> builtins.list[dict[str, Any]]
```

List tunnels, optionally filtered by status.

#### `create`

```python theme={null}
create(self) -> dict[str, Any]
```

Create a tunnel mapping `subdomain` to a local host/port.

#### `delete`

```python theme={null}
delete(self, tunnel_id: str) -> dict[str, Any]
```

Delete a tunnel by id.

#### `rotate`

```python theme={null}
rotate(self) -> dict[str, Any]
```

Rotate the active tunnel to a new local target.

#### `create_lease`

```python theme={null}
create_lease(self) -> dict[str, Any]
```

Mint a tunnel lease for a local client instance.

#### `heartbeat`

```python theme={null}
heartbeat(self, lease_id: str) -> dict[str, Any]
```

Report connector readiness for an active lease.

#### `release_lease`

```python theme={null}
release_lease(self, lease_id: str) -> dict[str, Any]
```

Release a tunnel lease without deleting historical records.

#### `refresh_lease`

```python theme={null}
refresh_lease(self, lease_id: str) -> dict[str, Any]
```

Extend the TTL on an existing tunnel lease.

#### `delete_lease`

```python theme={null}
delete_lease(self, lease_id: str) -> dict[str, Any]
```

Delete a tunnel lease.

#### `list_leases`

```python theme={null}
list_leases(self) -> builtins.list[dict[str, Any]]
```

List tunnel leases for the org or a specific client instance.

#### `create_synth_lease`

```python theme={null}
create_synth_lease(self) -> dict[str, Any]
```

Create a SynthTunnel lease (hosted relay to your local container).

#### `get_synth_lease`

```python theme={null}
get_synth_lease(self, lease_id: str) -> dict[str, Any]
```

Fetch a SynthTunnel lease by id.

#### `close_synth_lease`

```python theme={null}
close_synth_lease(self, lease_id: str) -> dict[str, Any]
```

Close an active SynthTunnel lease.

#### `refresh_synth_worker_token`

```python theme={null}
refresh_synth_worker_token(self, lease_id: str) -> dict[str, Any]
```

Rotate the worker token used to authenticate tunnel traffic.

### `AsyncTunnelsClient`

Async adapter over :class:`TunnelsClient` (thread-offloaded).
