{"slug": "i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc", "title": "I built 53 pay-per-call APIs that AI agents can pay for autonomously (x402 + USDC on Base)", "summary": "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.", "body_md": "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.\n\n[x402](https://www.x402.org/) removes that wall. It's an open payment protocol: the server answers `402 Payment Required`\n\n, 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.\n\n**Base URL:** `https://api.x-402.online/`\n\n— the root returns a machine-readable JSON catalog, and there's an `/openapi.json`\n\n+ `/llms.txt`\n\nfor agents.\n\n53 endpoints, all pay-per-call in USDC (from **$0.005**), settled on **Base** (also accepts Polygon & Arbitrum):\n\nThe friction *is* the value: these wrap sources that need signup, keys, or heavy parsing (XBRL, registries) and expose them as one clean, payable call.\n\n``` js\nimport { wrapFetchWithPaymentFromConfig } from \"@x402/fetch\";\nimport { ExactEvmScheme } from \"@x402/evm\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nconst account = privateKeyToAccount(process.env.AGENT_KEY);\nconst fetchPaid = wrapFetchWithPaymentFromConfig(fetch, {\n  schemes: [{ network: \"eip155:8453\", client: new ExactEvmScheme(account) }],\n});\n\n// The wrapper handles the 402 -> sign -> retry automatically.\nconst res = await fetchPaid(\"https://api.x-402.online/v1/us/snapshot?ticker=AAPL\");\nconsole.log(await res.json());\n```\n\nThe agent's wallet just needs USDC on Base. No gas needed on the client side — the facilitator settles.\n\nReal on-chain payments are going through today (verifiable on [BaseScan](https://basescan.org/)). 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/`\n\nand let them pay their own way.\n\nFeedback welcome — happy to add endpoints agents actually ask for.", "url": "https://wpnews.pro/news/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc", "canonical_source": "https://dev.to/laurent_halbrun_0dbdc876c/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc-on-base-11a1", "published_at": "2026-07-22 01:59:37+00:00", "updated_at": "2026-07-22 03:02:46.584877+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-infrastructure", "developer-tools"], "entities": ["x402", "Base", "USDC", "Polygon", "Arbitrum", "BaseScan"], "alternates": {"html": "https://wpnews.pro/news/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc", "markdown": "https://wpnews.pro/news/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc.md", "text": "https://wpnews.pro/news/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc.txt", "jsonld": "https://wpnews.pro/news/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc.jsonld"}}