Use case
Host a documentation site with prepaid hosting.
A documentation site built as a supported Next.js app publishes to a production URL with one command from the project root. Hosting is prepaid at $0.20 per project-day in USDC over the x402 protocol, and no account, dashboard, or API key is required at any point.
The command
From the docs project root, run:
$ npx x402-hosting@latest deploy --days 90
The CLI detects the Next.js version, adds the OpenNext Cloudflare configuration, and builds locally with OpenNext before any payment. The API then answers with an HTTP 402 challenge: $0.01 for the upload plus $0.20 per project-day. Ninety days of docs hosting is $18.01. Supported Next.js versions are 15.5.21 up to (but not including) 16, and 16.2.11 and later.
Docs sites as Next.js apps
Static pages, search indexes, versioned content, and dynamic API reference routes all run under one project. An active project includes its static assets, 100,000 dynamic requests, and 15 million CPU milliseconds. Updates are redeploys at the same URL for $0.01 each, so shipping a docs fix costs the same as fixing a typo should.
Monitoring a docs site with free reads
npx x402-hosting@latest statusreports the URL, owner wallet, and expiry — freenpx x402-hosting@latest deploymentslists deployment history — free- Both commands support
--jsonfor scripts and agents - No token or login is needed to read project state
Because reads are free, a cron job or an agent can watch expiry continuously and renew before the docs ever go offline. The documentation describes the full CLI surface.
Expiry and the grace window
Prepaid projects end by expiring, not by charging a card. If a docs site lapses, a 30-day grace window keeps the project recoverable: renewing inside that window republishes the site at the same URL. After the grace window the project is gone, and starting over means a new URL.
What it costs
Renewal is $0.20 × additional project-days from the owner wallet — the wallet that paid the first upload. There is no subscription or automatic renewal; the site stays online exactly as long as it is paid for. Full numbers are on the pricing page.