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" }| Field | Type | Notes |
|---|---|---|
template | string, optional | og (default), chrome, noir, ice, gold, toxic, ghost, magma |
subject | string | The drip, up to 300 characters |
image | data URL, optional | png/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
statusUrluntilstatusisdone, then fetchimageUrl. - 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.