{"version":"2.0.0","service":{"name":"nanobanana-x402","description":"Paid Gemini image generation and image editing API. Pay USDC on Base and receive base64 PNG output.","contact":"jadedfocus@gmail.com","operator":"Royal Agentic Enterprises"},"endpoints":{"/api/generate-image":{"method":"POST","accepts":{"scheme":"exact","price":"$0.01","network":"eip155:8453","payTo":"0x9b8a27e03ceba490953cda8ab1291c0e13baf72f","extra":{"facilitator":"https://raen-facilitator.fly.dev/facilitator"}},"description":"Generate an AI image from a text prompt on Base. POST the prompt and optional aspectRatio, receive a base64 PNG as JSON. $0.01 per call, Base USDC x402.","mimeType":"application/json","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"prompt":"A product hero image for a Telegram breach monitor, neon terminal style","aspectRatio":"16:9"}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"description":"Text prompt describing the image to generate"},"aspectRatio":{"type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:3","3:4","4:5","5:4","21:9"],"description":"Output aspect ratio (default: 1:1)"}},"required":["prompt"],"additionalProperties":false}},"required":["type","method","bodyType","body"],"additionalProperties":false}},"required":["input"]}}},"inputSchema":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"description":"Text prompt describing the image to generate"},"aspectRatio":{"type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:3","3:4","4:5","5:4","21:9"],"description":"Output aspect ratio (default: 1:1)"}},"required":["prompt"],"additionalProperties":false},"inputExample":{"prompt":"A product hero image for a Telegram breach monitor, neon terminal style","aspectRatio":"16:9"},"outputSchema":{"type":"object","properties":{"ok":{"type":"boolean"},"model":{"type":"string"},"aspectRatio":{"type":"string"},"image_b64":{"type":"string","description":"Base64-encoded image bytes"},"mime_type":{"type":"string"},"error":{"type":"string","description":"Present only on failure"}},"required":["ok"]}},"/api/edit-image":{"method":"POST","accepts":{"scheme":"exact","price":"$0.01","network":"eip155:8453","payTo":"0x9b8a27e03ceba490953cda8ab1291c0e13baf72f","extra":{"facilitator":"https://raen-facilitator.fly.dev/facilitator"}},"description":"Edit an existing image with a natural-language prompt. POST source image base64 + prompt, receive the edited base64 PNG as JSON. $0.01 per call, Base USDC x402.","mimeType":"application/json","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"prompt":"A product hero image for a Telegram breach monitor, neon terminal style","aspectRatio":"16:9"}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"description":"Text prompt describing the image to generate"},"aspectRatio":{"type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:3","3:4","4:5","5:4","21:9"],"description":"Output aspect ratio (default: 1:1)"}},"required":["prompt"],"additionalProperties":false}},"required":["type","method","bodyType","body"],"additionalProperties":false}},"required":["input"]}}},"inputSchema":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"description":"Natural-language edit instructions"},"image_b64":{"type":"string","minLength":1,"description":"Base64-encoded source image"},"mime_type":{"type":"string","default":"image/png","description":"Source image MIME type"},"aspectRatio":{"type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:3","3:4","4:5","5:4","21:9"],"description":"Output aspect ratio (default: 1:1)"}},"required":["prompt","image_b64"],"additionalProperties":false},"inputExample":{"prompt":"Change the background to a sunset","image_b64":"<BASE64_IMAGE>","mime_type":"image/png","aspectRatio":"16:9"},"outputSchema":{"type":"object","properties":{"ok":{"type":"boolean"},"model":{"type":"string"},"aspectRatio":{"type":"string"},"image_b64":{"type":"string","description":"Base64-encoded image bytes"},"mime_type":{"type":"string"},"error":{"type":"string","description":"Present only on failure"}},"required":["ok"]}}}}