Control plane API
Everything the CLI and dashboard do is built on a small JSON API at https://lrok.io/api/v1. Use it to script tunnel listings, pull request history, manage reservations, or build your own dashboards.
Authentication
You can authenticate two ways:
- Clerk session JWT. Used by the dashboard and the CLI when you sign in interactively. Pass it as
Authorization: Bearer <jwt>. - API key. Long-lived, prefixed
ak_. Create one at /dashboard/tokens and pass it asAuthorization: Bearer ak_….
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/me/plan | Current plan and quota usage. |
GET | /api/v1/me/tunnels | List active tunnels for the caller. |
GET | /api/v1/me/tunnels/{sub}/requests | Recent captured requests for a tunnel (paged). |
GET | /api/v1/me/tunnels/{sub}/requests/stream | Server-sent events stream of new requests. |
GET | /api/v1/me/reservations | List, create, or delete reserved subdomains. |
List your plan
$ curl -H "Authorization: Bearer $LROK_API_KEY" \
https://lrok.io/api/v1/me/plan
{
"plan": "pro",
"tunnels": { "limit": null, "active": 3 },
"reservations": { "limit": null, "used": 2 }
}List active tunnels
$ curl -H "Authorization: Bearer $LROK_API_KEY" \
https://lrok.io/api/v1/me/tunnels
[
{
"subdomain": "stripe-dev",
"publicUrl": "https://stripe-dev.lrok.io",
"createdAt": "2026-05-04T12:01:33Z",
"remoteAddr": "203.0.113.7"
}
]Tail requests in real time
The stream endpoint emits a request event for every captured request. Use any SSE client.
$ curl -N -H "Authorization: Bearer $LROK_API_KEY" \
https://lrok.io/api/v1/me/tunnels/stripe-dev/requests/stream
event: request
data: {"id":"req_01H...","method":"POST","path":"/webhook","status":200}Manage reservations
# List
$ curl -H "Authorization: Bearer $LROK_API_KEY" \
https://lrok.io/api/v1/me/reservations
# Create
$ curl -X POST -H "Authorization: Bearer $LROK_API_KEY" \
-d '{"subdomain":"stripe-dev"}' \
https://lrok.io/api/v1/me/reservations
# Release
$ curl -X DELETE -H "Authorization: Bearer $LROK_API_KEY" \
https://lrok.io/api/v1/me/reservations/stripe-dev