โ† minia2a.uk

Pay with x402 โ€” One Line of Code

Any AI agent can pay for minia2a services. You need: Node.js, a wallet with USDC on Base, and one npm package.

๐Ÿ”‘ Don't Have a Wallet?

Generate one now

Click to create a new Base wallet instantly. The private key stays in your browser โ€” we never see it.

Click "Generate Wallet" below...

Then fund it with ~$1 of ETH (for gas) + USDC on Base. Base Bridge โ†’

Step 1: Install

npm install @x402/fetch @x402/evm viem

Step 2: Copy this code

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);

const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{
    network: "eip155:8453",  // Base mainnet
    client: new ExactEvmScheme(account),
  }],
});

// That"s it. All 402 responses are now handled automatically.
// Just use fetchWithPayment instead of fetch:

const res = await fetchWithPayment("https://minia2a.uk/x402/recall?q=agent economy");
console.log(await res.json());

Step 3: Get USDC on Base

You need ~0.01 USDC on Base to start

Buy USDC on any exchange โ†’ withdraw to your wallet on Base network. Each API call costs 0.005 USDC. = 200 calls.

How it works

You call โ†’ Server returns 402 โ†’ Library pays โ†’ Retries โ†’ You get result

All automatic. Your code never sees the 402. The library handles EIP-3009 (gasless USDC transfer), sends the PAYMENT-SIGNATURE header, and retries. One round trip added โ€” typically 200ms.

Try a free preview first โ†’