Any AI agent can pay for minia2a services. You need: Node.js, a wallet with USDC on Base, and one npm package.
→ Using MetaMask Agent Wallet or a Cloudflare-hosted agent? Start with the Agent Wallet Guide.
Sign a short message with any EVM wallet — no registration, no USDC. Wallet ownership is proven by signature, so the key never leaves your machine.
🎁 Get 5 Free Trials →You don't need any funds — any EVM wallet (even an empty one) gets 5 free trial calls by signing a message; no registration required. See the Agent Wallet Guide.
To receive payments (as an API seller), use a standard wallet like MetaMask or Coinbase Wallet, fund it on Base (~$1 ETH for gas + USDC), then paste your address when registering. Base Bridge →
Platform fee: 5% standard (0% through 2026 — launch promotion).
Want to sell your own API on minia2a? Read the publisher standard — how to publish, price, and behave (ok:true/false contract).
Security: minia2a never generates, holds, or displays your private key. Your wallet address alone is enough to transact with us.
npm install @x402/fetch @x402/evm viem
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),
}],
spendControls: false, // Disables the SDK's default $1 per-payment cap -- without it $2+ services cannot be paid
});
// 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());
⚠️ $1 per-payment cap: the @x402 SDK defaults spendControls.maxAmountPerPayment to $1. Leave that default in place and the higher-priced services — $2 contract audits, $20 AI audits — fail to pay. The example above sets spendControls: false to disable the cap.
Buy USDC on any exchange → withdraw to your wallet on Base. Prices are per service (from ~$0.001; audit tiers run $2–$50) — check the price on each endpoint's 402 offer or in the catalog.
All automatic. Your code never sees the 402. The library signs the offer (x402 exact — an EIP-3009 authorization — in USDC on Base), sends the PAYMENT-SIGNATURE header, and retries. One round trip added — typically 200ms.
400 instead of a 402? That is a signature problem, not a payment oneThe library handles payment for you. But if you attach a wallet yourself — which is how the free trial works — you own the signature. A 400 means it did not verify, and paying will not fix it. The body names the exact string to sign.
Trial call: ?wallet=0x… plus X-Wallet-Signature = EIP-191 personal_sign over minia2a trial:<wallet>:<serviceId>:<unixSeconds>, and X-Trial-Timestamp = that same unix seconds. 5 free calls per wallet, no registration. Sign the catalog id (x402-time), not the URL slug (time) — signing the slug is the most common cause.
Telling them apart: 400 missing X-Wallet-Signature header · 400 signature does not match wallet · 400 X-Trial-Timestamp expired · 402 = pay, or your 5 trials are spent. Over MCP the same failure arrives as -32602 inside an HTTP 200, so a status-code-only client reads it as success.
Full diagnosis with real response bodies: 400 vs 402 vs -32602 →
If the service fails after your payment settled, the platform refunds it. The X-Minia2a-Refund response header (CORS-exposed) says what happened: enqueued — a refund record exists for this payment and the worker pays it back on the same network; not-applicable — this is a third-party listing, the payTo is the seller's own wallet, so only the seller can refund it; enqueue-failed — it should be refunded but writing the record failed, do not treat it as success and keep the tx hash.
A refund is not a retry signal: the settled payment stays bound to the call (replaying it hits the replay lock), so start a new payment to try again. Failure bodies may also carry "refunded": true|false.
Some calls take a while — captcha-solve polls its upstream for up to 60s, the AI audits take seconds to tens of seconds. Add ?async=1 and the call returns 202 immediately with a job id; you collect the result when it is ready.
Submit: POST /x402/<service>?async=1 — payment or trial works exactly as usual (settled up front, same as sync) → 202 {"jobId":"…","statusUrl":"/jobs/<id>","token":"…","pollAfterMs":1000}. The same id is mirrored on the X-Minia2a-Job response header — CORS-exposed, so a browser client can read the job id without parsing the body.
Collect: GET /jobs/<jobId> with header X-Job-Token: <token>, polling every pollAfterMs. status goes queued → running → done, or ends at failed (delivery failed — a paid call is refunded, a trial call gets its trial back) or rejected (upstream refused your request; httpStatus says why — fix the params and resubmit; a paid call is refunded and a trial call gets its trial back).
Limits: params ≤64KB, result ≤1MiB (over that the job fails and refunds — use the synchronous call for large responses), results expire after 24h, ≤3 in-flight trial jobs per wallet. Syncing is unchanged: without ?async=1 nothing about your call changes. Machine-readable summary: /llms-tasks.txt
What a live call offers: the 402 challenge quotes USDC on eip155:8453 (Base) — that is the settlement rail for every call today.
What /.well-known/x402 advertises: a networks list, each entry with a facilitator — catalog metadata, not a per-call promise. An entry there does not mean an endpoint offers that rail. Read the file for its current contents rather than trusting any summary, including this one; today its cloudflare and circle entries are chainId 8453, i.e. they route to Base, not a separate rail.
Treat the extra networks as catalog metadata, not a per-call promise. Developer detail: CF Wallets + x402 →
Only dependency scanners in the x402 ecosystem. \$0.02/scan on Base.
# npm (JavaScript/TypeScript)
curl -X POST https://minia2a.uk/x402/npm-audit \
-H "content-type: application/json" \
-d '{"packageJson":"{\"dependencies\":{\"lodash\":\"4.17.20\"}}"}'
# pip (Python)
curl -X POST https://minia2a.uk/x402/pip-audit \
-H "content-type: application/json" \
-d '{"requirements":"requests==2.28.0"}'