cd /news/artificial-intelligence/i-built-53-pay-per-call-apis-that-ai… · home topics artificial-intelligence article
[ARTICLE · art-67892] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

I built 53 pay-per-call APIs that AI agents can pay for autonomously (x402 + USDC on Base)

A developer built 53 pay-per-call APIs that AI agents can autonomously pay for using the x402 payment protocol, settling in USDC on Base. The APIs require no account or API key—agents simply pay a few cents per call on-chain, with prices starting at $0.005. The project aims to eliminate the human paperwork barrier for autonomous agents accessing data.

read1 min views1 publishedJul 22, 2026

AI agents are getting good at deciding what data they need. What they're bad at is the human paperwork around getting it: creating accounts, clicking email confirmations, pasting API keys, entering a credit card. Every one of those is a wall an autonomous agent can't climb on its own.

x402 removes that wall. It's an open payment protocol: the server answers 402 Payment Required

, the client pays a few cents in USDC on-chain, and the request goes through — no account, no key, no human. So I built a farm of APIs designed to be consumed exactly that way.

Base URL: https://api.x-402.online/

— the root returns a machine-readable JSON catalog, and there's an /openapi.json

  • /llms.txt

for agents.

53 endpoints, all pay-per-call in USDC (from $0.005), settled on Base (also accepts Polygon & Arbitrum):

The friction is the value: these wrap sources that need signup, keys, or heavy parsing (XBRL, registries) and expose them as one clean, payable call.

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_KEY);
const fetchPaid = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

// The wrapper handles the 402 -> sign -> retry automatically.
const res = await fetchPaid("https://api.x-402.online/v1/us/snapshot?ticker=AAPL");
console.log(await res.json());

The agent's wallet just needs USDC on Base. No gas needed on the client side — the facilitator settles.

Real on-chain payments are going through today (verifiable on BaseScan). If you're building agents that need company data, web extraction, or open-data lookups without the account/key dance, point them at https://api.x-402.online/

and let them pay their own way.

Feedback welcome — happy to add endpoints agents actually ask for.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @x402 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-53-pay-per-c…] indexed:0 read:1min 2026-07-22 ·