Quickstart
Run the complete local stack, then submit one paid AI request through the browser. The quickstart is optimized for local and test wallets only.
Prerequisites
- Bun.
- Go.
- Rust and Cargo.
- An unfunded local or test EVM wallet.
- Optional OpenRouter key when using the default OpenRouter AI provider.
Never use a funded wallet, seed phrase, production key, or customer wallet in local examples.
Install
Terminal
git clone https://github.com/AnkanMisra/MicroAI-Paygate.git
cd MicroAI-Paygate
bun install
(cd web && bun install)
(cd gateway && go mod download)
(cd verifier && cargo build -q)
Configure
Terminal
cp .env.example .env
At minimum, review these values before starting the stack:
OPENROUTER_API_KEYwhenAI_PROVIDER=openrouter.SERVER_WALLET_PRIVATE_KEYfor receipt signing. Use an unfunded development key locally.RECIPIENT_ADDRESSfor payment contexts.CHAIN_IDandEXPECTED_CHAIN_ID, which should match.
Run
Terminal
bun run stack
Local services:
- Gateway:
http://localhost:3000 - Gateway Swagger UI:
http://localhost:3000/docs - Web:
http://localhost:3001 - Verifier health:
http://localhost:3002/health
The root stack command starts the gateway with memory receipt storage and response cache disabled unless you exported different values in the shell. That keeps the quickstart from requiring Redis.
First Request
- Open
http://localhost:3001. - Connect a local or test wallet.
- Paste text into the summarize form.
- Submit the request.
- Sign the EIP-712 payment context.
- Inspect the returned summary and signed receipt.
The deployed demo may have a cold start because the backend services can sleep after inactivity. A first request after a quiet period may take longer while the gateway and verifier wake.