In 5 minutes. Zero API keys. USDC on Base. 500 free credits to start.
One command. We create a wallet, credit it with 500 free calls. No MetaMask, no USDC, no KYC.
curl -s -X POST https://minia2a.uk/api/v1/register-simple \
-H "Content-Type: application/json" \
-d '{"name":"my-first-agent"}'
.env or your secrets manager.
Now save your wallet address โ you'll use it in every call:
export MINIA2A_WALLET="0xf16F0882de08315B438E9f3a2Abfb2d2E5d94ECA"
Every DeFi agent needs gas prices. Here's the one-liner:
curl "https://minia2a.uk/x402/gas?wallet=$MINIA2A_WALLET"
Check any ERC-20 token for honeypots, rug pulls, and owner control. Costs 1 credit.
# Check USDC on Base (safe reference)
curl "https://minia2a.uk/x402/token-security?wallet=$MINIA2A_WALLET&address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
# Check any token โ just swap the address
curl "https://minia2a.uk/x402/token-security?wallet=$MINIA2A_WALLET&address=0xYOUR_TOKEN_ADDRESS"
Fetch and parse any URL. Costs 1 credit. Your agent never touches a browser.
curl "https://minia2a.uk/x402/web-scrape?wallet=$MINIA2A_WALLET&url=https://news.ycombinator.com"
Here's a complete Python agent that uses minia2a services as tools. It checks gas prices, scans tokens, and scrapes the web โ then uses OpenAI to reason about the results.
# agent.py โ A research agent that pays for its own API calls
import os, json, requests
WALLET = os.getenv("MINIA2A_WALLET")
BASE = "https://minia2a.uk"
def call_minia2a(endpoint, params=None):
"""Call any minia2a service. Credits auto-debited from wallet."""
url = f"{BASE}/x402/{endpoint}"
if params:
url += "?" + "&".join(f"{k}={v}" for k,v in params.items())
url += f"&wallet={WALLET}"
return requests.get(url).json()
# Tool belt โ 170+ services available, here are 3
tools = {
"gas_price": lambda: call_minia2a("gas"),
"token_security": lambda addr: call_minia2a("token-security", {"address": addr}),
"web_scrape": lambda url: call_minia2a("web-scrape", {"url": url}),
}
# Example: DeFi research agent
def research_token(token_address):
"""Research a token: security check + market context"""
security = tools["token_security"](token_address)
gas = tools["gas_price"]()
print(f"Token: {token_address}")
print(f"Verdict: {security.get('verdict', 'unknown')}")
print(f"Honeypot: {security.get('honeypot', '?')}")
print(f"Gas (Base): {gas.get('gas',{}).get('base',{}).get('fast','?')} gwei")
# Now send to your LLM for reasoning:
# llm.analyze(f"Token security report: {json.dumps(security)}")
return security
if __name__ == "__main__":
# Research USDC on Base
research_token("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913")
print(f"\nCredits remaining: check with curl {BASE}/api/my-credits?wallet={WALLET}")
Run it:
export MINIA2A_WALLET="0xYOUR_WALLET"
pip install requests
python agent.py
For production agents, use the @x402/fetch library. It auto-detects 402 responses, signs payments with your wallet, and retries. Your code never sees a payment โ it just works.
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),
}],
});
// Now use fetchWithPayment instead of fetch โ it handles 402 automatically!
const gas = await fetchWithPayment("https://minia2a.uk/x402/gas");
const security = await fetchWithPayment(
"https://minia2a.uk/x402/token-security?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
);
console.log(await gas.json());
console.log(await security.json());
@x402/fetch auto-signs a USDC payment โ retries with PAYMENT-SIGNATURE header โ you get the result. One extra round trip (~200ms). All on Base L2.