> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meterlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Gateway: Per-Request USDC Proxy for AI Agents

> Wrap any HTTP API behind USDC micropayments. The Agent Gateway verifies x402 payments and proxies requests to your upstream — no OAuth, no subscriptions.

The Agent Gateway sits in front of your HTTP API and enforces per-request USDC payments using the x402 protocol. When an AI agent calls your route without a valid payment, the gateway immediately returns a `402` response describing exactly what is owed. The agent pays autonomously, retries the request with the payment header attached, and the gateway proxies the request to your upstream service after verifying settlement on-chain. You collect USDC directly to your organization's receiver wallet — no invoicing, no subscription management required.

## Environments

Use the sandbox URL during development and agent testing. Switch to the production URL when you are ready to accept live USDC payments.

| Environment        | Base URL                                          |
| ------------------ | ------------------------------------------------- |
| Production         | `https://gateway.meterlane.app`                   |
| Sandbox (demo org) | `https://gateway.meterlane.app/gateway/demo/demo` |

<Note>
  The sandbox route is publicly accessible. Any unauthenticated `GET` to it returns a real `402` response with payment requirements — useful for testing client-side x402 handling without creating an account.
</Note>

## Route URL pattern

Every route you create is reachable at a predictable URL derived from your organization slug and the route path you configure:

```text theme={null}
https://gateway.meterlane.app/gateway/{orgSlug}/{routePath}
```

For example, if your organization slug is `acme` and you create a route at path `/summarize`, agents call:

```text theme={null}
https://gateway.meterlane.app/gateway/acme/summarize
```

## Core paths

| Method | Path                  | Auth                      | Purpose                                                       |
| ------ | --------------------- | ------------------------- | ------------------------------------------------------------- |
| `GET`  | `/healthz`            | None                      | Liveness check — returns `{ status: "ok" }`                   |
| `GET`  | `/gateway/:orgSlug/*` | x402 (`X-PAYMENT` header) | Paid proxy — verifies payment, then forwards to your upstream |
| `POST` | `/api/routes`         | Bearer `bp_live_…`        | Create and manage payment routes                              |
| `GET`  | `/mcp/sse`            | Bearer API key            | MCP over SSE — expose routes as AI assistant tools            |

## Learn more

<CardGroup cols={3}>
  <Card title="Payment Flow" icon="arrow-right-arrow-left" href="/gateway/x402-flow">
    Understand the full x402 request lifecycle, headers, and error codes your agent will encounter.
  </Card>

  <Card title="Routes" icon="route" href="/gateway/routes">
    Create and manage routes from the dashboard or the management API.
  </Card>

  <Card title="MCP" icon="plug" href="/gateway/mcp">
    Expose your gateway routes as MCP tools for Claude and other AI assistants.
  </Card>
</CardGroup>
