Your AI agent can reason, plan, and execute. But can it pay? Can it autonomously buy the data it needs โ token prices, wallet intelligence, gas estimates โ without a human pulling out a credit card?
With x402 and minia2a, the answer is yes. Here's how to do it in three lines of code.
Traditional API access means API keys, signup forms, rate limits, and monthly subscriptions. AI agents can't fill out signup forms. They can't pass credit checks. They can't negotiate SaaS contracts.
But they can sign a transaction.
x402 (HTTP 402 Payment Required) lets your agent pay for API calls the same way it makes them: programmatically. No human in the loop.
# Self-custody: generate your own wallet, then sign EIP-191 "minia2a register: ".
curl -s -X POST https://minia2a.uk/api/v1/register-simple \
-H "Content-Type: application/json" \
-d '{"name":"my-first-agent","wallet":"0xYOUR_WALLET","signature":"0xYOUR_SIGNATURE"}'
That's it. Your agent is registered with 5 free trial calls (worth ~$2.50 in API calls). You keep your own self-custody wallet โ the platform never mints or holds your key. No KYC. No gas fees. No waiting.
export WALLET=0xYOUR_WALLET SERVICE=x402-time TS=$(date +%s)
export SIG=0xYOUR_SIGNATURE # EIP-191 personal_sign of: minia2a trial:$WALLET:$SERVICE:$TS
curl "https://minia2a.uk/x402/proxy/x402-time?wallet=$WALLET" \
-H "X-Wallet-Signature: $SIG" -H "X-Trial-Timestamp: $TS"
Your agent just paid for an API call. Credits were deducted from your balance. The response includes the data you asked for.
No API key. No subscription. No credit card. Just: agent wants data โ agent pays โ agent gets data.
curl -s "https://minia2a.uk/api/stats"
Note: V5 removed the per-wallet balance endpoint โ GET /api/v1/credits no longer exists (it returns 404). Your agent's trial state comes back inside each 402 response it receives, and platform-wide numbers live at /api/stats. Your agent is now a paying customer of the API economy.
minia2a lists 1,600+ x402-enabled services your agent can call right now:
| Service | What It Does | Price |
|---|---|---|
x402-time | Precise UTC timestamp | $0.001 |
x402-gas | Real-time gas prices across chains | $0.003 |
x402-token-security | Token contract audit (honeypot, tax, ownership) | $0.005 |
x402-wallet-intel | Wallet age, activity, PnL, tags | $0.005 |
x402-web-scrape | Scrape any webpage, clean output | $0.005 |
x402-ens-resolve | Resolve ENS names โ addresses | $0.001 |
x402-funding-rate | Perpetual funding rates across exchanges | $0.003 |
x402-sentiment | Crypto sentiment analysis | $0.003 |
Full catalog: curl https://minia2a.uk/api/services
Here's a Python agent that researches a token before trading โ it calls 3 paid APIs and pays for each:
import requests, os
WALLET = os.environ["MINIA2A_WALLET"]
BASE = "https://minia2a.uk/x402/proxy"
def call(service, **params):
params["wallet"] = WALLET
r = requests.get(f"{BASE}/{service}", params=params)
return r.json()
token = "0x1234..."
security = call("x402-token-security", token=token)
funding = call("x402-funding-rate", symbol="ETH")
sentiment = call("x402-sentiment", symbol="ETH")
print(f"Token safety: {security.get('result',{}).get('isHoneypot')}")
print(f"ETH funding: {funding.get('result',{}).get('rate')}")
print(f"ETH sentiment: {sentiment.get('result',{}).get('sentiment')}")
# (V5 has no per-wallet balance endpoint โ /api/v1/credits returns 404.
# Remaining trial calls come back in each 402 response body.)
After 5 free calls (or when you need more), your agent hits an HTTP 402:
Your agent sends $0.005 USDC on Base โ retries the request โ gets the data. The whole flow takes under 2 seconds. Or use @x402/fetch (npm) which handles the 402 โ pay โ retry cycle automatically:
import { x402Fetch } from "@x402/fetch";
const res = await x402Fetch("https://minia2a.uk/x402/proxy/x402-gas");
const data = await res.json();
In three lines of code, you gave your AI agent:
Your agent is no longer just a reasoning engine. It's an economic actor. It earns. It spends. It decides what data is worth paying for.
minia2a is a live marketplace. 180 services. USDC on Base. Pay per call. minia2a.uk