DEV Community

RileyCraig14
RileyCraig14

Posted on

How I built a pay-per-call API using x402 on Base — no subscriptions

Pay-Per-Call APIs Are the Future

Most APIs charge $99/month whether you make 1 call or 10,000. I built NEXUS — pay fractions of a cent per request using USDC on Base via x402.

What is x402?

When you call a NEXUS endpoint without payment, you get HTTP 402 with payment details. Pay the micropayment, retry, get your data. No subscription. No API key.

What NEXUS offers

  • Live crypto prices: $0.02/call
  • Reddit sentiment: $0.05/call
  • DeFi TVL: $0.005/call
  • Stock prices: $0.002/call

Try it

curl -X POST https://nexus-agent-xa12.onrender.com/data/crypto \
  -d "{\"coins\": [\"bitcoin\"]}"
Enter fullscreen mode Exit fullscreen mode

Also available as MCP server:

claude mcp add nexus npx @rileycraig/nexus-mcp
Enter fullscreen mode Exit fullscreen mode

Free competitor intelligence demo: rileycraig14.github.io/nexus-dashboard/competitor.html

Top comments (0)