In 5 minutes. Zero API keys. USDC on Base. 5 free trial calls to start.
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"}'
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.
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
?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.
$SERVICE in the signed message is the service id from
/api/services (x402-gas) โ not the URL path segment
(gas). Signing the wrong string fails verification.$TS is unix seconds and must be fresh โ accepted within ±5 minutes, and not reusable.400. Full recipe in AGENTS.md.
One chain per call โ pass &chain= to pick it
(base, ethereum, arbitrum, and more). Calling without the
parameter returns Base.
402 and a signed one with no trials left gets 402 too: either way you pay in
USDC on Base, no registration needed.
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"
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"
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
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.