Skip to main content

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

health(self) -> dict[str, Any]
Return tunnel service health for the configured backend.

list

list(self) -> builtins.list[dict[str, Any]]
List tunnels, optionally filtered by status.

create

create(self) -> dict[str, Any]
Create a tunnel mapping subdomain to a local host/port.

delete

delete(self, tunnel_id: str) -> dict[str, Any]
Delete a tunnel by id.

rotate

rotate(self) -> dict[str, Any]
Rotate the active tunnel to a new local target.

create_lease

create_lease(self) -> dict[str, Any]
Mint a tunnel lease for a local client instance.

heartbeat

heartbeat(self, lease_id: str) -> dict[str, Any]
Report connector readiness for an active lease.

release_lease

release_lease(self, lease_id: str) -> dict[str, Any]
Release a tunnel lease without deleting historical records.

refresh_lease

refresh_lease(self, lease_id: str) -> dict[str, Any]
Extend the TTL on an existing tunnel lease.

delete_lease

delete_lease(self, lease_id: str) -> dict[str, Any]
Delete a tunnel lease.

list_leases

list_leases(self) -> builtins.list[dict[str, Any]]
List tunnel leases for the org or a specific client instance.

create_synth_lease

create_synth_lease(self) -> dict[str, Any]
Create a SynthTunnel lease (hosted relay to your local container).

get_synth_lease

get_synth_lease(self, lease_id: str) -> dict[str, Any]
Fetch a SynthTunnel lease by id.

close_synth_lease

close_synth_lease(self, lease_id: str) -> dict[str, Any]
Close an active SynthTunnel lease.

refresh_synth_worker_token

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