Claude Code Auto Mode:
The Agent API Guide

⏰ Auto mode becomes default August 14, 2026 — 3 days. Classifier tokens are now free for Pro/Max/Team users. The last barrier to autonomous agent spending is gone.

Claude Code auto mode means your agent can approve its own tool calls — including paying for external API calls with real money. If your agent needs a web page scraped, a token audited, or a domain looked up, it can discover the service, try it for free, and pay for it — all without asking you.

This guide covers the practical "how": real endpoints, real prices, real curl commands. No theory. No fluff.

The 30-Second Version

1
Agent needs a service — e.g., "what's the ETH gas price right now?"
curl -s https://minia2a.uk/api/services | jq '.services[:3]'
2
Server says "402 Payment Required" — with machine-readable payment terms
HTTP/1.1 402 Payment Required
Payment-Required: <base64 JSON>

{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453",
"amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo":"0xAb62452b4b019bC4402BFfCca6C706d16d72A7Bf","maxTimeoutSeconds":120,
"extra":{"name":"USD Coin","version":"2"}}]}
3
Agent pays and retries — signs a USDC transfer, attaches it, gets the result
curl -H "X-Payment: " ... → 200 OK + result

Real Endpoints You Can Try Right Now

All prices in USDC. All endpoints settle in USDC on Base. Every one has 5 free trial calls per signed wallet.

Service What it does Price Trial? Auto-mode use case
web-scrape Extract clean text from any URL $0.005 5 free Research, data gathering, content extraction
crypto-price Live crypto/forex prices $0.005 5 free Financial analysis, trading decisions
token-security Smart contract audit + risk score $0.02 5 free DeFi safety checks before transactions

Full directory: minia2a.uk/discover-new.html — 1,703 endpoints across 18 categories. Sorted by: AI, crypto, web, security, data, finance, and more.

The 3-Curl Walkthrough

Step 1: Discover what's available

curl -s https://minia2a.uk/api/services | jq '.services[:3] | .[] | {name, category, tier}'

Returns a catalog of services. Your agent filters by category, price, or endpoint name.

Step 2: Probe a service (no payment)

curl -sI "https://minia2a.uk/x402/web-scrape?probe=1"

Returns HTTP 402 with the payment terms. In x402 v2 the challenge is the Payment-Required header, base64 JSON — decode it with:

curl -sD - -o /dev/null "https://minia2a.uk/x402/web-scrape?probe=1" \
  | grep -i '^payment-required:' | cut -d' ' -f2 | base64 -d | python3 -m json.tool
HTTP/1.1 402 Payment Required
Payment-Required: # base64 of the object below
{
  "x402Version": 2,
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:8453",          # CAIP-2 chain id
    "amount": "10000",              # USDC, 6 decimals — 10000 = $0.01
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0xAb62452b4b019bC4402BFfCca6C706d16d72A7Bf",
    "maxTimeoutSeconds": 120,
    "extra": { "name": "USD Coin", "version": "2" }  # EIP-712 signing domain
  }]
}

Your agent reads that offer and knows exactly how much to pay, on what chain, in what token, and to whom.

Step 3: Try for free (5 calls, registered wallet)

curl -s "https://minia2a.uk/x402/web-scrape?url=https://example.com" \
  -H "X-Wallet-Signature: 0x…" -H "X-Trial-Timestamp: <unix-ts>" -H "X-Agent-ID: agent:YOUR_STABLE_ID"

The trial response includes:

{
  "result": "<extracted content>",
  "_trial": {
    "remaining": 4,
    "total": 5,
    "register": "POST /api/v1/register-simple {name, wallet, signature}"
  }
}

5 free calls per wallet. Sign with any wallet to claim them — trial calls have already run on 960 of the 1,703 published services. Your agent can test a service before committing a single cent.

Auto Mode + Agent Budget: The Killer Combo

📄 .agent-budget

Drop this file in your project root. Claude Code's auto mode reads it before authorizing payments:

{
  "daily_limit_usdc": 5.00,
  "max_per_call_usdc": 1.00,
  "allowlist": ["minia2a.uk", "x402.org"]
}

This is a proposed standard. Claude Code doesn't natively read .agent-budget yet — but the format is designed for adoption by any agent framework.

At current minia2a prices ($0.001–$50/call, most under a cent), a $5 daily budget buys hundreds to thousands of API calls per day. Your agent can scrape the web, audit tokens, and look up domains — all autonomously, all within budget.

Your API Auto-Mode Checklist

✅ Is your own API auto-mode ready?

If you're an API provider, use our free tools to verify your 402 responses are machine-readable:

The Architecture: How Agent Payments Actually Work

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│  Your Agent  │────▶│  Discovery   │────▶│  API Server  │
│  (CC auto)   │     │  (minia2a)   │     │  (seller)    │
└──────┬───────┘     └──────┬───────┘     └──────┬───────┘
       │                    │                    │
       │  1. "Find me a     │                    │
       │     captcha solver"│                    │
       │───────────────────▶│                    │
       │                    │                    │
       │  2. Here are 3,    │                    │
       │     cheapest first │                    │
       │◀───────────────────│                    │
       │                    │                    │
       │  3. GET /x402/crypto-price              │
       │────────────────────────────────────────▶│
       │                    │                    │
       │  4. 402 Payment Required                │
       │     Payment-Required: …                 │
       │◀────────────────────────────────────────│
       │                    │                    │
       │  5. Signs USDC transfer                 │
       │     Retries with X-Payment header       │
       │────────────────────────────────────────▶│
       │                    │                    │
       │  6. 200 OK + result                     │
       │◀────────────────────────────────────────│
       │                    │                    │

What Makes a 402 Response "Machine-Readable"

An autonomous agent can't read your HTML pricing page. It reads the 402 challenge. In x402 v2 that challenge is the Payment-Required header, carrying this object base64-encoded:

HTTP/1.1 402 Payment Required
Payment-Required: # base64 of the object below
{
  "x402Version": 2,
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:8453",          # CAIP-2 chain id
    "amount": "10000",              # USDC, 6 decimals — 10000 = $0.01
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0xAb62452b4b019bC4402BFfCca6C706d16d72A7Bf",
    "maxTimeoutSeconds": 120,
    "extra": { "name": "USD Coin", "version": "2" }  # EIP-712 signing domain
  }]
}

Without an accepts[] offer, the agent sees "402 Payment Required" and… stops. It doesn't know how much, on what chain, in what token, or to whom. The offer is the API for the API payment. Every field above earns its place: asset and payTo say where the money goes, extra is the EIP-712 domain the client signs against, and maxTimeoutSeconds bounds how long the authorization stays valid.

Why Trial-First Matters for Auto Mode

🔄 The Auto-Mode Discovery Loop

An agent with a $5/day budget can't afford to pay for every endpoint just to see if it works. The trial-first pattern solves this:

  1. Discover — search the catalog for relevant services
  2. Probe — check 402 headers, verify the endpoint is alive
  3. Trial — test with real input, 5 free calls per wallet
  4. Decide — if the output is good, register and pay for more
  5. Repeat — for every new task, discover → probe → trial → pay

This is the loop Claude Code agents will run starting Aug 14. Make sure your discovery layer supports it.

One Command to Get Started

curl -s https://minia2a.uk/api/services | \
  jq '.services[] | select(.category == "ai" or .category == "web" or .category == "crypto") | {name, category}'

Paste that into your terminal. Your agent can do the same — programmatically. That's the point.

🚀 Ready for Auto Mode?

1,703 x402 endpoints. USDC on Base. 5 free trial calls per wallet. Then pay per call via x402.

Browse Directory → Validate Your API →


Published August 11, 2026. Service prices and availability verified at time of writing via live endpoint probes. Auto mode goes default Aug 14 per Anthropic announcement.