HTTP API

Provision Daemon Tunnel

Provision a background session over the HTTP API.

Docs for LLMs

Create a background (daemon) session. It uses the same authentication and metered pricing as a foreground one: 1 credit per hour, never more than 300 credits per rolling 30 days. The ttl 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
subdomainNoA stable name to reserve or reuse
kindNotunnel or webhook
emailNo1 to give a webhook endpoint an email inbox

Response#

200 OK:

JSON
{
  "subdomain": "tunnel-f7e8d9c0",
  "publicUrl": "https://tunnel-f7e8d9c0.otterkit.app",
  "connectUrl": "wss://otterkit.app/ws/connect?subdomain=tunnel-f7e8d9c0&token=<token>",
  "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-10-02T13:00:00.000Z",
  "cost": 1,
  "balance": 49
}

With ttl=never, autoStopAt is null. Errors match POST /api/agent/tunnels.