Pay per call with x402
Your agent can paint room photos without a Muro account. visualize_room and relight_room can be paid per call in USDC on Base mainnet with x402, an open protocol for paying for API calls with a signed stablecoin transfer.
No sign-up, API key or subscription. You need a wallet with USDC on Base and an MCP client that supports x402.
If the call carries a Muro API key or an OAuth session, x402 is skipped and the call is paid from that account’s credits.
Prices
Section titled “Prices”| Tool | Price |
|---|---|
visualize_room, Standard (≈1K) |
0.25 USDC per color |
visualize_room, HD (≈2K) |
0.50 USDC per color |
visualize_room, Ultra (≈4K) |
0.75 USDC per color |
relight_room |
0.25 USDC |
get_visualization |
Free (the job_id proves you paid) |
search_paint_colors, get_paint_color, find_equivalents, list_brands |
Free |
get_credits |
Not available over x402 (needs an API key) |
A visualize_room call is priced from its arguments: 3 colors in HD cost 1.50 USDC. The exact amount comes back in the payment requirements, so the client sees it before signing anything.
How it works
Section titled “How it works”Payment data travels in the tool call’s _meta, following the same MCP x402 convention as Cloudflare’s agents/x402.
-
Call the tool without payment. For example,
visualize_roomwith 2 colors in HD. You get backisError: true, a readable line (This call costs 1.00 USDC on Base, paid with x402.) and the payment requirements in_meta["x402/error"]:{"x402Version": 2,"error": "PAYMENT_REQUIRED","resource": {"url": "x402://visualize_room","description": "Paint a room photo","mimeType": "application/json"},"accepts": [{"scheme": "exact","network": "eip155:8453","amount": "1000000","asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo": "0x681F7E6B36a7E12d728d2bF2db3aD55FF250F564","maxTimeoutSeconds": 300,"extra": { "name": "USD Coin", "version": "2" }}]}amountis in USDC base units (6 decimals), so1000000is 1.00 USDC.assetis native USDC on Base.payTois Muro’s wallet. -
Sign and retry. The client signs an EIP-3009
transferWithAuthorizationfor that amount (theexactEVM scheme), base64-encodes the x402 payment payload and sends the same call again with it in_meta["x402/payment"]. -
Muro verifies, paints, then settles. Muro verifies the payment, does the work, and settles the transfer on-chain only after the images are delivered. The result carries
_meta["x402/payment-response"]:{ "success": true, "transaction": "0x…", "network": "eip155:8453", "payer": "0x…" }
Payments are verified and settled by the PayAI facilitator.
When you are charged
Section titled “When you are charged”- A failed painting costs nothing. If the job or any color fails, the payment is not settled and the result ends with
You were not charged: the x402 payment was not settled. - Colors still rendering count as delivered. A long job can return before every image is ready. The payment settles, and you fetch the rest with
get_visualizationfor free. - Settlement pending. If the on-chain transfer has not confirmed in time, you still get the images, with
"x402/payment-response": { "success": false, "errorReason": "settlement_pending" }. The transfer usually lands shortly after. - Settlement refused. If the facilitator rejects the settlement after the work is done, you get a new payment requirement instead of the result.
- Invalid payment. A payment that fails verification returns the requirements again, with the reason in
error(andpayer, when known). For example,INVALID_PAYMENTmeans the token is not valid base64 JSON.
Clients
Section titled “Clients”Any MCP client that implements the _meta["x402/payment"] convention can pay. Cloudflare’s agents package, for example, has withX402Client: it wraps an MCP client, reads x402/error, asks you to confirm and retries with the payment. Clients without x402 support see the payment-required message and can use a Muro API key instead.
Limits
Section titled “Limits”x402 calls have the same limits as calls with an API key: 1 to 12 colors per call, photos up to 12 MB (JPEG, PNG or WebP), and the rate limits in Pricing and limits.