2026-06-17

How the proof-of-work free tier works

Agent402 has over a thousand tools, and most of them are pure CPU โ€” no external API calls, no network I/O, just computation. Things like JSON formatting, hash generation, regex matching, unit conversion, and text analysis.

For these tools, we offer a proof-of-work free tier: instead of paying USDC, the caller solves a small computational challenge. It's the same idea as Hashcash (the precursor to Bitcoin mining), adapted for API access control.

How it works

  1. Request a challenge. The client sends a request without payment. The server responds with 402 Payment Required and includes a PoW challenge in the response headers.
  2. Solve the challenge. The client finds a nonce that, when combined with the challenge, produces a hash with a required number of leading zero bits. This takes roughly 50-200ms on modern hardware.
  3. Submit the solution. The client re-sends the original request with the PoW solution in the headers. The server verifies the solution (instant) and serves the result.

Each solution is single-use and slug-scoped โ€” it can only be used once, and only for the specific tool it was issued for. This prevents replay attacks and solution-sharing across tools.

Why proof-of-work?

We wanted a free tier that didn't require registration or API keys (that would defeat the whole point of x402). PoW gives us three things:

Browser-side solving

The PoW challenge is designed to be solvable in the browser using Web Crypto. The agent402-client SDK handles this automatically โ€” it detects a 402 response, solves the challenge, and retries, all transparently. For agents using the MCP integration, the hosted server at /mcp handles PoW internally.

Which tools are free?

Any tool that runs purely on the server's CPU without making external network requests is PoW-eligible. Tools that call upstream APIs (web search, rendering, geocoding) require payment because they have a real marginal cost. The tool catalog marks each tool's pricing โ€” $0.000 means PoW-eligible.

← Back to blog