Skip to main content
The Meterlane Agent Gateway exposes a single base URL that handles both x402 paid proxy traffic and Bearer-authenticated management calls. You send unpaid requests to a route URL, receive a 402 with payment requirements, sign a USDC payment, and retry — the gateway validates, settles, and forwards your request to the upstream service. Management endpoints let you create and configure those routes using a dashboard-issued API key.

Base URL

EnvironmentURL
Productionhttps://gateway.meterlane.app

Authentication

The gateway uses two distinct authentication schemes depending on the endpoint you are calling. Management endpoints (/api/*) require a Bearer token issued from your Meterlane dashboard:
Authorization: Bearer bp_live_…
Paid proxy routes (/gateway/:orgSlug/*) use the x402 X-PAYMENT header instead of Bearer. You do not need an API key to call a paid route — you need a valid signed payment payload. On the first (unpaid) request you can omit the header entirely; the gateway returns a 402 with the requirements you need to construct it.
X-PAYMENT: <base64-encoded signed payment payload>
Never send a Bearer token on proxy route requests. The /gateway/:orgSlug/* paths authenticate exclusively through x402. See the Payments page for the full two-step flow.

Error Format

All error responses share a consistent JSON shape:
{
  "code": "ROUTE_NOT_FOUND",
  "message": "No active route matched the requested path.",
  "requestId": "req_01hx9z2k3m4n5p6q7r8s9t0u"
}
CodeHTTP StatusMeaning
BAD_REQUEST400Malformed request body or query parameters
NONCE_REPLAY400The payment nonce has already been used
ORG_SUSPENDED403Your organisation has been suspended
NOT_FOUND404The requested resource does not exist
ROUTE_NOT_FOUND404No active route matched the proxy path

Endpoints Summary

MethodPathAuthPurpose
GET/healthzNoneLiveness probe
GET/gateway/:orgSlug/:routePathx402 (X-PAYMENT)Paid proxy to upstream
POST/api/routesBearerCreate a payment route
GET/api/routesBearerList org routes
PATCH/api/routes/:idBearerUpdate a route
DELETE/api/routes/:idBearerDelete a route
GET/api/gateway/metricsBearerUsage and facilitator health
GET/mcp/sseBearerMCP over SSE
Paid proxy routes at /gateway/:orgSlug/* authenticate via X-PAYMENT, not Authorization: Bearer. All other API paths under /api/* require a Bearer token.

Explore the API

Routes

Create, update, and delete payment routes for your organisation.

Payments

Understand the x402 two-step flow and proxy endpoint behaviour.

Metrics

Query usage statistics and facilitator health for your gateway.