Skip to content
Fourohtwo

Create an upload session for a new hosted Next.js site

api.x402-hosting.com/v1/uploads

Create an upload session for a new hosted Next.js site. Call this first when deploying a new project: it returns a presigned artifact upload URL, and the paying wallet becomes the project owner.

BaseAnswering
POSThttps://api.x402-hosting.com/v1/uploads

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.x402-hosting.com/v1/uploads", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"contentType":"application/zip","name":"my-site","sha256":"0000000000000000000000000000000000000000000000000000000000000000","size":1024}),
});
console.log(await res.json());

Example input

{
  "contentType": "application/zip",
  "name": "my-site",
  "sha256": "0000000000000000000000000000000000000000000000000000000000000000",
  "size": 1024
}

More from x402 HostingProvider status