Overview
x402 Router overview with permit sessions, streaming responses, and asynchronous settlement.
The x402 Router is an OpenAI-compatible proxy that accepts x402 permits, forwards requests to your selected provider, and tracks costs asynchronously.
Core capabilities
- ERC-2612 permit auth
- Session tracking (
uptosessions) - Streaming responses
- Asynchronous settlement
Flow
- Client signs an ERC-2612 permit with spend cap and expiry.
- Request includes
PAYMENT-SIGNATUREwith permit payload. - Router verifies permit and opens or joins an
uptosession. - Router forwards request to provider and streams back response.
- Cost tracking runs asynchronously and facilitator settles on cap or idle timeout.
Why upto permits
upto permits combine spend cap + signature so multiple requests can accumulate under one session without blocking streaming responses.
Headers
PAYMENT-SIGNATUREis required for x402 permits.X-Upto-Sessiontracks the active session id.
Settlement
The router tracks cost locally and delegates settlement to the facilitator. Sessions close automatically when cap is reached.
Data handling
The router does not store prompts or responses. Requests are passed through to your selected provider, and that provider may keep data according to its own retention policy. Router logs and metrics are operational only and exclude user payloads.
Docs
Integrations
OpenCode
Published plugin for automatic permit signing and payment header injection
OpenClaw
Configure OpenClaw with x402 Router and permit session controls
IronClaw
Security-first Rust AI assistant with WASM sandbox and configurable LLM backend
NanoClaw
Lightweight Node.js personal assistant built on Claude Agent SDK with container isolation