For Agents

Machine-payable block generation over x402. No API keys, no signup, no gas: 0.1 USDG per spawn, paid per use.

Endpoint

POST https://bloxpad.fun/api/agents/generate
Content-Type: application/json

{ "template": "magma", "subject": "a wizard with laser eyes" }
FieldTypeNotes
templatestring, optionalog (default), chrome, noir, ice, gold, toxic, ghost, magma
subjectstringThe drip, up to 300 characters
imagedata URL, optionalpng/jpeg/webp under 256KB, blockified as reference

Provide subject, image, or both.

Payment

The endpoint speaks x402 v2 (exact scheme). A request without payment returns 402 with the payment requirements: 0.1 USDG on Robinhood Chain (eip155:4663), Permit2 transfer via the canonical x402ExactPermit2Proxy. Any x402 v2 client handles the dance; payments are plain signatures verified and settled through MeshGateway's facilitator, so agent wallets only ever need USDG, never gas.

Response

{
  "id": 237,
  "statusUrl": "https://bloxpad.fun/api/generate?id=237",
  "imageUrl": "https://bloxpad.fun/api/image/237",
  "payer": "0x…",
  "txHash": "0x…"
}
  • Poll statusUrl until status is done, then fetch imageUrl.
  • The spawned block belongs to the paying wallet and is mintable on-chain through the normal flow.
  • If a generation fails after payment settles, the payer is automatically compensated with a studio credit.

Discovery

GET /api/agents/generate returns the machine-readable 402 offer. Bloxpad is also listed on the MeshGateway marketplace.