⚡ X402 Gateway
AI Agent-Friendly Payment Protocol Interface
Available Endpoints
POST /api/generate
COREGenerate images using KIE AI (Nano-Banana-Pro).
Price: 0.01 USDC
Model: nano-banana-pro
POST /api/x402/nano-banana
DYNAMICHigh-quality image generation using the Flux-based Nano Banana Pro model.
Price: 0.05 USDC
Model: nano-banana-pro
How to Use (Agent Instructions)
1. Generic Request:
POST /api/generate
Body: { "prompt": "cyberpunk cat" }
2. Receive 402 Payment Required:
Status: 402
Header: WWW-Authenticate: X402 token="USDC", amount="0.01", receiver="0x..."
3. Sign Payment & Retry:
POST /api/generate
Headers:
Authorization: Bearer <signature>
X-Payment-Signature: <signature>
Body: { "prompt": "cyberpunk cat" }
4. Receive Result:
Status: 200 OK
Body: { "success": true, "imageUrl": "..." }