canonical: https://jentic.com/apis/localxpose.io/localxpose

# LocalXpose API

Jentic publishes the only available OpenAPI specification for LocalXpose API, keeping it validated and agent-ready. LocalXpose is a reverse-proxy and tunneling service that exposes localhost services to the public internet, similar to ngrok. The API lets developers list, create, start, stop, and delete tunnels, manage reserved domains, retrieve account info, generate access tokens, and inspect inbound requests for a tunnel. It is built around a tunnels-and-domains model and uses a bearer token for auth.

## For AI agents

Create and manage local tunnels and reserved domains, start and stop tunnels, and inspect inbound requests against the LocalXpose API.

## Scope

Does not handle DNS hosting, CDN configuration, or production load balancing - use for reverse-proxy tunnel and reserved domain management only.

## Capabilities

- Create a new tunnel pointing at a local address and start it remotely
- List, inspect, update, and delete existing tunnels
- Reserve and manage custom domains attached to tunnels
- Inspect inbound HTTP requests routed through a specific tunnel
- Generate per-account access tokens for additional automation clients
- Retrieve current user/account info for billing and quota checks

## Use cases

### On-Demand Webhook Receiver in Development

Developers building third-party webhook handlers need a public URL pointing at their local server. LocalXpose's API creates a tunnel, starts it, and returns a public URL that the third party can call. When the developer is done, the tunnel is stopped or deleted. The whole flow can be wrapped in a CLI or IDE extension.

Example prompt: Call POST /tunnels with the local address, then POST `/tunnels/{id}/start`, return the public URL to the developer, and call POST `/tunnels/{id}/stop` when the session ends.

### Demo Environment with Reserved Domain

Sales engineers running customer demos want a stable public URL across sessions. LocalXpose's domain endpoints reserve a domain that can be attached to a tunnel each time the demo runs. The tunnel is started before the demo and stopped after, but the URL stays the same.

Example prompt: Call POST /domains to reserve a domain, then POST /tunnels referencing that domain and POST `/tunnels/{id}/start` before the demo.

### Inbound Request Inspection for Debugging

When a webhook is failing, developers need to inspect what the third party actually sent. LocalXpose exposes GET `/tunnels/{id}/requests`, returning recent inbound requests for the tunnel. Combined with stopping and restarting the tunnel programmatically, this gives an effective debugging loop without UI clicks.

Example prompt: Call GET `/tunnels/{id}/requests` for the failing tunnel and surface the most recent inbound request body and headers to the developer.

### AI Agent Local Sharing Helper

An AI agent helping a developer share a local prototype with a teammate can use Jentic to call LocalXpose, create a tunnel, start it, and post the public URL back into chat. The bearer token stays in your Jentic One instance.

Example prompt: Use Jentic to call POST /tunnels then POST `/tunnels/{id}/start` and reply with the resulting public URL when the user types 'share my local app at port 3000'.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/tunnels` | Create a tunnel |
| POST | `/tunnels/{id}/start` | Start a tunnel |
| POST | `/tunnels/{id}/stop` | Stop a tunnel |
| GET | `/tunnels/{id}/requests` | Inspect inbound requests on a tunnel |
| POST | `/domains` | Reserve a custom domain |
| POST | `/user/access-token` | Generate an access token |

## Key resources

- **Tunnels** — Create, start, stop, update, and delete tunnels
- **Domains** — Reserve and manage custom domains for tunnels
- **User** — Retrieve account info and generate access tokens
- **Requests** — Inspect recent inbound requests on a tunnel

## Why Jentic

- **Setup:** Wiring the LocalXpose API by hand means setting up its bearer token auth, minting an access token, attaching the Authorization header to every call against api.localxpose.io, and handling retries yourself. Through Jentic you install once, import the LocalXpose API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** LocalXpose puts the tunnel id in the URL path (`/tunnels/{id}/start`, `/tunnels/{id}/stop`), so a rule can pin your agent to one tunnel: it can start it and read its requests and nothing else. You choose the operations it may call, so stopping the tunnel or creating reserved domains is not included unless you add it.
- **Credential handling:** Your LocalXpose bearer token is stored once, encrypted, by your own Jentic One instance and injected as the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'expose my local server', and Jentic returns the matching LocalXpose operations, such as create tunnel and start tunnel, with their input schemas so the agent chains them without browsing the reference docs.

## Related APIs

- **ngrok API** — Alternative tunneling service with broader integrations and more mature management API
- **Cloudflare API** — Pair LocalXpose tunnels with Cloudflare DNS and WAF for production-grade exposure
- **GitHub API** — Wire LocalXpose tunnel URLs into GitHub webhooks during development

## FAQ

### Why is there no official OpenAPI spec for LocalXpose API?

LocalXpose does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call LocalXpose API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the LocalXpose API use?

LocalXpose uses bearer-token authentication. Send the token as Authorization: Bearer {token}. Through Jentic, the bearer token is stored encrypted and injected at execution time, so the raw token never enters agent context.

### Can I attach a stable custom domain to a tunnel?

Yes. Reserve a domain via POST /domains and reference it when creating the tunnel via POST /tunnels. The reserved domain remains attached across stop/start cycles, giving a stable public URL.

### What are the rate limits for the LocalXpose API?

Rate limits are not declared in the spec. LocalXpose applies plan-level limits to concurrent tunnels, bandwidth, and reserved domains; the API itself is rate-limited at a level that comfortably supports normal automation.

### How do I expose my local server to the internet through Jentic?

Search Jentic for 'create a tunnel to my local server'. Jentic returns the POST /tunnels operation. Load the schema, supply the local address and protocol, then call POST `/tunnels/{id}/start` with the returned tunnel ID. The response includes the public URL.

### How do I see recent inbound requests on a tunnel?

Call GET `/tunnels/{id}/requests` with the tunnel ID. The response contains the most recent inbound HTTP requests routed through the tunnel, useful for debugging webhook integrations.

### Can I limit what my agent is allowed to do with the LocalXpose API?

Yes. Because you run Jentic One yourself, your own rules decide which LocalXpose operations and credentials the agent may use. Since LocalXpose puts the tunnel id in the URL path, such as POST `/tunnels/{id}/start` and GET `/tunnels/{id}/requests`, you can pin the agent to a single tunnel and let it start that tunnel and read its inbound requests while withholding everything else. Operations like stopping the tunnel via POST `/tunnels/{id}/stop` or reserving domains via POST /domains stay off limits unless you explicitly grant them.
