AI agents need to manipulate images as part of their workflows. Traditional APIs require OAuth, API keys, and subscription setup — barriers that break autonomous operation. The Clear Canvas x402 API eliminates all of that: any agent with a funded Base wallet can remove image backgrounds in a single HTTP round-trip, paying per image on-chain with no prior registration.
Why Use Clear Canvas
- No API key or account — just a wallet on Base mainnet (or Sepolia for testing)
- Deterministic pricing — always $0.05 USDC per image, no surprise fees
- x402 replay protection — each payment nonce is used exactly once
- Stateless — no sessions or auth tokens for your agent to manage
- Any language — Python, TypeScript, Go, Rust, or anything that speaks HTTP
- Testnet available — test on Base Sepolia before spending real USDC
How It Works
- 1
Fund a Base wallet with USDC
Your agent needs an EOA wallet on Base mainnet with enough USDC to pay for images. Use the Coinbase SDK or any wallet library to create and fund one.
- 2
POST your image — receive HTTP 402
Send a raw PNG, JPEG, or WebP as the request body. The API returns HTTP 402 with structured payment details — amount, asset, network, and facilitator URL.
- 3
Sign and submit the USDC payment
Use the Coinbase x402 SDK to sign a USDC transfer for $0.05 and encode it as a base64 X-PAYMENT header. The payment is cryptographically bound to this specific request.
- 4
Resend with X-PAYMENT — receive transparent image
Resend the identical POST with the X-PAYMENT header attached. On successful payment verification, the API returns the background-removed image as PNG or WebP.
Frequently Asked Questions
What wallets are supported?
Any externally owned account (EOA) on Base mainnet. Hardware wallets, software wallets, or programmatically derived keys — any wallet that can sign a USDC transfer works.
Is replay protection built in?
Yes. Each x402 payment includes a nonce that can only be used once. Replaying a previously used payment header returns HTTP 402, preventing double-spending.
What if processing fails after payment?
The failure is logged with your wallet address and transaction hash for manual review. Contact support with your transaction hash. There is no automatic refund.
How do I test without spending real USDC?
Use Base Sepolia testnet. Get testnet USDC from the Coinbase faucet, point your client at the testnet facilitator URL, and test your full payment flow at no cost.
Is there a rate limit for agents?
Unpaid discovery requests (the first 402 probe) are rate-limited at 30 per minute per IP. Paid requests that carry a valid X-PAYMENT header have no rate limit.
Also compare your options
These side-by-side pages are the fastest way to see whether Clear Canvas fits your workflow.
Ready to Get Started?
No sign-up needed. Your images stay on your device.