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=4hQuery parameters#
| Parameter | Required | Values |
|---|---|---|
ttl | No (default 24h) | e.g. 45m, 4h, 3d, or "never" to run until stopped |
subdomain | No | A stable name to reserve or reuse |
kind | No | tunnel or webhook |
email | No | 1 to give a webhook endpoint an email inbox |
Response#
200 OK:
{
"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.