โ† minia2a.uk The Stripe for AI Agents

๐Ÿ› ๏ธ Build an AI Agent That Pays For Its Own APIs

In 5 minutes. Zero API keys. USDC on Base. 5 free trial calls to start.

๐ŸŽ New here? Sign in 10 seconds โ†’ get 5 free trial calls. Bring your own wallet โ€” sign and register.
Get 5 Free Trial Calls โ†’

๐Ÿ“‹ What we'll build

  1. Register your agent wallet (10 seconds, 5 free trial calls)
  2. Call the gas price oracle โ€” Ethereum, Base, Arbitrum fees
  3. Scan a token for security risks โ€” honeypot check, rug pull detection
  4. Scrape a webpage โ€” fetch any URL as clean JSON
  5. Wire it into an AI agent loop โ€” Python + OpenAI example
  6. Go production with x402 โ€” Node.js, @x402/fetch, real USDC payments

1 Sign Wallet โ€” Get 5 Free Trial Calls

One command โ€” but you bring your own wallet. Sign a message with your keys; the platform never generates or holds them. No KYC.

# 1. Sign "minia2a register: 0xYOUR_WALLET" with your wallet (EIP-191 personal_sign).
# 2. POST your name + wallet + signature:
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"}'
{ "ok": true, "wallet": "0xYOUR_WALLET", "trials": 5, "message": "5 free trial calls bound to your wallet" }
๐Ÿ”’ You control your keys. The platform never receives your private key โ€” it only verifies your signature.

Now set the three values every trial call needs. $TS must be fresh each call โ€” sign it, do not reuse it.

export WALLET="0xYOUR_AGENT_WALLET"          # lower or checksummed, both verify
export TS=$(date +%s)                        # unix seconds, accepted within ยฑ5 min
export SIG=0xYOUR_SIGNATURE                  # EIP-191 personal_sign of:
                                             #   minia2a trial:$WALLET:$SERVICE:$TS
# $SERVICE is the service id from /api/services โ€” e.g. x402-gas, x402-time,
# x402-token-security, x402-web-scrape. NOT the URL path segment.

2 Call the Gas Price Oracle

Every DeFi agent needs gas prices. Every trial call takes two halves โ€” the wallet in the query string, and the signature in the headers:

export SERVICE=x402-gas
export SIG=0xYOUR_SIGNATURE   # EIP-191 personal_sign of: minia2a trial:$WALLET:$SERVICE:$TS
curl "https://minia2a.uk/x402/gas?wallet=$WALLET" \
  -H "X-Wallet-Signature: $SIG" -H "X-Trial-Timestamp: $TS"
# -> 200, x-trial-mode: wallet, x-trial-remaining: 4
Heads up โ€” ?wallet= on its own is a hard 400. Not a 402: the server rejects the request outright with {"error":"missing X-Wallet-Signature header"} before it ever looks at your balance. Both halves are required โ€” the signature and the ?wallet= parameter. Drop either one and the call fails.

Two things that trip people up: Both failures return 400. Full recipe in AGENTS.md.
{ "ok": true, "result": { "chain": "base", "gasPriceWei": "6000000", "gasPriceGwei": 0.006 } }

One chain per call โ€” pass &chain= to pick it (base, ethereum, arbitrum, and more). Calling without the parameter returns Base.

๐Ÿ’ก Your trial covers it. Gas costs $0.50 per call if you pay โ€” but your first 5 calls are free with the signed-wallet trial above. Past those 5, an unsigned request gets 402 and a signed one with no trials left gets 402 too: either way you pay in USDC on Base, no registration needed.

3 Scan a Token for Security Risks

Check any ERC-20 token for honeypots, rug pulls, and owner control. $0.02 per call โ€” free inside your 5 trials.

export SERVICE=x402-token-security
export SIG=0xYOUR_SIGNATURE   # sign: minia2a trial:$WALLET:$SERVICE:$TS

# Check USDC on Base (safe reference)
curl "https://minia2a.uk/x402/token-security?wallet=$WALLET&address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" \
  -H "X-Wallet-Signature: $SIG" -H "X-Trial-Timestamp: $TS"

# Check any token โ€” just swap the address
curl "https://minia2a.uk/x402/token-security?wallet=$WALLET&address=0xYOUR_TOKEN_ADDRESS" \
  -H "X-Wallet-Signature: $SIG" -H "X-Trial-Timestamp: $TS"
{ "ok": true, "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "chain": "base", "isHoneypot": false, "isOpenSource": true, "buyTax": "0", "sellTax": "0", "cannotBuy": false, "transferPausable": false, "hiddenOwner": false, "holderCount": "10481211" }

4 Scrape Any Webpage as JSON

Fetch and parse any URL. $0.50 per call โ€” free inside your 5 trials. Your agent never touches a browser.

export SERVICE=x402-web-scrape
export SIG=0xYOUR_SIGNATURE   # sign: minia2a trial:$WALLET:$SERVICE:$TS

curl "https://minia2a.uk/x402/web-scrape?wallet=$WALLET&url=https://news.ycombinator.com" \
  -H "X-Wallet-Signature: $SIG" -H "X-Trial-Timestamp: $TS"
{ "ok": true, "url": "https://news.ycombinator.com", "status": 200, "title": "Hacker News", "text": "Hacker News new | past | comments | ask | show | jobs ..." }

5 Wire It Into an AI Agent

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, time, requests
from eth_account import Account
from eth_account.messages import encode_defunct

WALLET = os.getenv("MINIA2A_WALLET")        # 0x... โ€” the wallet you registered
KEY    = os.getenv("MINIA2A_PRIVATE_KEY")   # only used to sign; never sent anywhere
BASE   = "https://minia2a.uk"

def call_minia2a(service_id, path, params=None):
    """Call any minia2a service. Your 5 free trials are bound to the signed wallet."""
    url = f"{BASE}/x402/{path}?wallet={WALLET}"
    if params:
        url += "&" + "&".join(f"{k}={v}" for k, v in params.items())
    ts = str(int(time.time()))              # fresh signature per call, ยฑ5 min window
    sig = Account.sign_message(
        encode_defunct(text=f"minia2a trial:{WALLET}:{service_id}:{ts}"),
        private_key=KEY,
    ).signature.hex()
    r = requests.get(url, headers={
        "X-Wallet-Signature": sig if sig.startswith("0x") else "0x" + sig,
        "X-Trial-Timestamp": ts,
    })
    return r.json()

# Tool belt โ€” 1,600+ services available, here are 3
tools = {
    "gas_price":      lambda chain="base": call_minia2a("x402-gas", "gas", {"chain": chain}),
    "token_security": lambda a: call_minia2a("x402-token-security", "token-security", {"address": a}),
    "web_scrape":     lambda u: call_minia2a("x402-web-scrape", "web-scrape", {"url": u}),
}

# 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"Honeypot: {security.get('isHoneypot')}")
    print(f"Open source: {security.get('isOpenSource')}")
    print(f"Buy/sell tax: {security.get('buyTax')}/{security.get('sellTax')}")
    print(f"Holders: {security.get('holderCount')}")
    print(f"Gas (Base): {gas.get('result', {}).get('gasPriceGwei')} 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"\nTrial calls deduct automatically per call โ€” 1 trial each, from your 5-trial grant")

Run it:

export MINIA2A_WALLET="0xYOUR_WALLET"
export MINIA2A_PRIVATE_KEY="0xYOUR_PRIVATE_KEY"
pip install requests eth-account
python agent.py

6 Go Production โ€” Real x402 Payments

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());
๐Ÿ”‘ How it works: Your agent calls โ†’ server returns HTTP 402 "Payment Required" โ†’ @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.

๐Ÿš€ What's Next?

๐Ÿ“ก

Browse 1,673 Services

$0.02โ€“$0.50 per call ยท first 5 free
Gas, tokens, captcha, DNS, email, scraping, sentiment, ENS, and more.
๐Ÿ”Œ

MCP Integration

1-line setup
Add minia2a to Claude Code, Cursor, or any MCP client. Your agent can call services directly.
๐Ÿ“˜

Agent Developer Guide

Full reference
Registration, payment flow, API catalog, error handling, rate limits.
๐Ÿ’ณ

Payment Setup

USDC on Base
How to fund your wallet with USDC and go from free trial to paid.
โœ… You now have a working agent that pays for its own APIs.
5 free trial calls to start. When they run out, your agent pays per call in USDC on Base over x402.
Payment docs โ†’