Agents
Deploy Next.js from Cursor.
The Cursor agent can publish your Next.js app to a production URL without leaving the editor. It runs one terminal command — npx x402-hosting@latest deploy --days 30 — and the hosting invoice is paid in USDC over the x402 protocol from a wallet. Thirty days costs $6.01. There are no API keys to store, no dashboards to open, and no logins to complete.
Docs the agent can read on its own
The Cursor agent works from the same public, machine-readable documentation as every other agent. /llms.txt maps the documentation surface, the docs describe the command workflows, and https://api.x402-hosting.com/openapi.json specifies the HTTP API behind the CLI. Nothing needs to be provisioned or configured before the first deploy — the agent reads, runs, and pays.
One terminal command
From the root of a supported Next.js project — versions 15.5.21 up to (but not including) 16, or 16.2.11 and later — the agent runs:
$ npx x402-hosting@latest deploy --days 30
The CLI builds the app locally with OpenNext. Only after the build succeeds does the API answer with an HTTP 402 payment challenge: $0.01 for the first upload plus $0.20 per project-day. The wallet signs the challenge, and the platform publishes the artifact as a Cloudflare Worker. A local build failure never reaches payment, so it costs nothing.
Payment from a wallet, not a key
x402 replaces the API-key model with a per-operation payment. The --payer flag selects how the wallet signs: auto by default, env for credentials in the environment, external for a handoff to a payer you run, and awal for the awal agentic wallet CLI. The wallet that pays the first upload owns the project; later paid mutations must settle from the same wallet or they are rejected with wallet_not_owner.
The URL goes back into the chat
When the deploy completes, the agent reads the result and reports a stable URL likehttps://app-682fe91de571a7338dd1.x402-hosting.com directly in the conversation. A first deploy also writes x402-hosting.json to the project root — URL, project id, owner wallet, expiry, no secrets — so a later Cursor session can renew, redeploy, or roll back without any re-discovery.
What the agent needs to know
- One command: npx x402-hosting@latest deploy --days 30
- 30 days for $6.01 prepaid in USDC; redeploys cost $0.01
- Local build runs before payment — failures are free
- Machine-readable docs: /llms.txt, /openapi.json, /docs
- The paying wallet owns the project permanently