⚡ 60-Second Paid API Call — Zero Setup, Free Credits

August 2, 2026
Tutorial x402 curl Free Credits Quickstart

You're 60 seconds from your first paid API call.

No wallet setup. No crypto. No code. Just curl and 500 free credits on minia2a. Here's exactly how, with 7 real examples you can run right now.

What's happening: You're using HTTP 402 Payment Required — the same status code your browser sees when you hit a paywall. But instead of asking a human for a credit card, it tells your terminal exactly how much USDC to send and where. On minia2a, you get 500 free credits to try it.

1 Get your free credits (10 seconds)

curl -X POST https://minia2a.uk/api/register \
  -H "Content-Type: application/json" \
  -d '{"name": "test-agent", "email": "[email protected]"}'

Returns your API key and 500 free credits instantly. No email verification required.

2 Try 7 real paid API calls (45 seconds)

Each of these costs 1 credit. You have 500. Pick any — they all work the same way.

⛽ Gas Estimation

Current Base chain gas price for your next transaction.

1 credit
curl https://minia2a.uk/api/x402-gas

🔐 Token Security Scan

Check any ERC-20 token for honeypots, mint functions, owner privileges.

1 credit
curl "https://minia2a.uk/api/x402-token-security?token=0x..."

🤖 Captcha Solving

Solve image captchas — your agent's eyes when scraping requires it.

1 credit
curl -X POST https://minia2a.uk/api/x402-captcha-solve -d '{"image":"base64..."}'

🌐 Web Scraping

Fetch and parse any webpage. Returns clean text, no HTML noise.

1 credit
curl "https://minia2a.uk/api/x402-web-scrape?url=https://example.com"

💱 Polymarket Data

Live prediction market prices, volumes, and liquidity.

1 credit
curl "https://minia2a.uk/api/x402-polymarket?market=presidential"

🕒 Current Time

UTC timestamp with timezone conversion. Dead simple.

1 credit
curl "https://minia2a.uk/api/x402-time?tz=America/New_York"

🔍 ENS Resolution

Resolve .eth names to addresses. Forward and reverse.

1 credit
curl "https://minia2a.uk/api/x402-ens-resolve?name=vitalik.eth"

3 What happens behind the scenes

When you call without credits:

HTTP/1.1 402 Payment Required
X-PAYMENT-REQUIRED: amount=0.005,asset=USDC,network=base,address=0xf16F...

When you use your free credits (or USDC wallet):

HTTP/1.1 200 OK
X-PAYMENT: 0xabc123...def456

{"gas_price": "0.0123 gwei", "base_fee": "0.0101 gwei", ...}

4 Go from free to paid (when you're ready)

Free credits are great for testing. When you want to use minia2a in production:

# 1. Fund your wallet (USDC on Base)
# 2. Set up your agent with x402 payment middleware
npm install @x402/fetch

# 3. Your agent pays automatically
import { wrapFetchWithPayment } from '@x402/fetch';
const paidFetch = wrapFetchWithPayment(fetch, wallet);
const gas = await paidFetch("https://minia2a.uk/api/x402-gas");

Your agent now has a wallet. It earns. It spends. You stay in control.

What's Next?

You just made your first paid API call. Here's where to go from here:

🎁 You have 500 free credits right now. That's 500 API calls. Start with the gas estimator above — it's 1 credit, instant response, and proves the entire x402 payment flow works. curl https://minia2a.uk/api/x402-gas

← Back to minia2a  |  All tutorials  |  Get API key