API

Provision Daemon Tunnel

Provision a daemon (background) tunnel. Same metered pricing as foreground: 1 credit per connected hour. The ttl query parameter sets the auto-stop time, not the price.

POST/api/agent/tunnels/daemon?ttl=4h

Query parameters:

ParameterRequiredValues
ttlNo (default: 24h)e.g. 45m, 4h, 3d, or "never" to run until stopped

Response (200):

json
{
  "subdomain": "tunnel-f7e8d9c0",
  "publicUrl": "https://tunnel-f7e8d9c0.otterkit.app",
  "connectUrl": "wss://otterkit.app/ws/connect?subdomain=tunnel-f7e8d9c0",
  "mode": "daemon",
  "pricing": {
    "hourlyCredits": 1,
    "monthlyCapCredits": 300,
    "note": "Charged per connected hour, never more than 300 credits per 30 days; first hour charged now."
  },
  "autoStopAt": "2026-07-15T09:00:00.000Z",
  "cost": 1,
  "balance": 49
}