DEV Community

Marcus Chenmember_832ef635
Marcus Chenmember_832ef635

Posted on

I Built a Pay-Per-Call Tools API That Only Accepts USDC — $0.01 to $0.03 a Call

Two weeks ago I shipped a French voiceover API that only accepts payment from robots (that story here). Score so far: one $0.05 payment. The bottleneck was never the product — it was distribution.

So this week I went wider: same payment rail, but a catalog of tools any agent pipeline can use, at prices so low that integration cost is the only real decision.

What I shipped

x402-outils — five deterministic micro-services, pay-per-call, USDC on Base:

Service Price What it does
openapi-lint $0.02 Structural lint of an OpenAPI 3.x spec (JSON or YAML): missing operationIds, no 2xx response, missing requestBody… each finding with severity + path
csv-profil $0.02 Rows, column type guesses, missing values, exact duplicate rows
hash $0.01 SHA-256/SHA-512 of any text
resume $0.03 Bullet-point summary (local LLM)
traduction $0.03 EN<->FR translation (local LLM)

Live endpoint (HTTPS):

https://outils.187.77.111.249.sslip.io/run

OpenAPI spec: https://outils.187.77.111.249.sslip.io/openapi.json

Agent card (machine-readable): https://outils.187.77.111.249.sslip.io/.well-known/agent-card.json

Update (same day): now speaks standard x402 — any x402 client library can pay with a signed EIP-3009 authorization (X-Payment header); settlement runs through the permissionless PayAI facilitator on Base mainnet, so no API key or account is needed on either side. The manual "transfer + tx hash" flow still works as a fallback.

Why no accounts, no API keys

Every tool API I've integrated as a builder starts the same way: signup form, email confirmation, dashboard, API key, billing page. That's 15 minutes of friction for a 50-millisecond call.

This one has none of it. The flow:

  1. POST /run with {"service": "hash", "text": "abc"} → HTTP 402 with price, currency, wallet address.
  2. Send the USDC on Base (one transfer call).
  3. Retry with header X-Payment-Proof: <tx hash> → result.

The server verifies the transaction on-chain (the 40-line verifier I wrote about here), checks it's a real USDC transfer to the right wallet for at least the price, and rejects replays. No SDK, no Stripe, no KYC.

The honest part

Zero sales on this catalog so far — it launched today. The voiceover API next to it made $0.05 in two weeks. I'm publishing the usual way (marketplaces, agent directories, this post) and measuring what actually converts before building more.

What I genuinely don't know yet: whether agents shopping for tools care more about price per call or not having to write the glue code themselves. The lint/profiling tools are trivially reimplementable — the bet is that $0.02 is cheaper than anyone's time to bother.

If you're building agent pipelines, I'd take the feedback: which deterministic step would you actually pay $0.02 to not self-host?


Stack: Python stdlib HTTP server, edge-tts (for the voiceover service), a local LLM for summary/translation, Base RPC for payment verification. Total marginal cost per call: effectively zero.

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.