{"uid":"cap_qMU9i1Bo4sOoxagdHjaBQ","slug":"nanobanana-x402-ai-image-generator-76ed7f98","name":"nanobanana-x402 AI Image Generator","description":"Generate or edit an image with Gemini and receive base64 PNG output through a pay-per-request API.","url":"https://nanobanana-x402.fly.dev/api/generate-image","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"description":"Text prompt describing the image to generate"},"aspectRatio":{"enum":["1:1","16:9","9:16","3:2","2:3","4:3","3:4","4:5","5:4","21:9"],"type":"string","description":"Output aspect ratio (default: 1:1)"}}},"responseSchema":{"type":"json","example":{"ok":true,"input":{"type":"http","method":"POST","bodyFields":{"prompt":"A product hero image for a Telegram breach monitor, neon terminal style","aspectRatio":"16:9"}},"model":"gemini-3.1-flash-image-preview","image_b64":"iVBORw0KGgoAAAANSUhEUgAA...","mime_type":"image/png","aspectRatio":"1:1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":1,"rating":{"score":"1.00","successRate":"0.98","reviews":1,"stars":"5.0","state":"rated"},"availabilityStatus":"healthy","priceObserved":{"p10Cents":"1.0000","medianCents":"1.0000","p90Cents":"1.0000","minCents":"1.0000","maxCents":"1.0000","p95Cents":"1.0000","sampleCount":239,"varies":false,"failureChargeRate":null},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Kj_xXF1xor2TQq19iDQxf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates an AI image from a text prompt using Google Gemini Flash Image model, returning a base64-encoded PNG with optional aspect ratio control","exampleAgentPrompt":"Generate an AI image of a cozy coffee shop interior with warm lighting and latte art on the counter, in 16:9 widescreen format.","exampleUseCases":null,"resultDescription":"A base64-encoded PNG image generated by Google Gemini Flash Image model, matching the provided text prompt and requested aspect ratio. The image can be decoded and displayed or saved directly.","failureModes":["Invalid or missing prompt — returns 400 bad request","Unsupported aspect ratio value — returns 400 with enum validation error","Model overload or service unavailability — returns 5xx server error","Payment not processed or insufficient USDC balance — returns 402 payment required","Prompt violates content policy — returns error with policy violation message","Malformed request body — returns 400 JSON parse error"],"whenToPreferThis":"Choose this endpoint when you need fast, high-quality AI image generation backed by Google Gemini with support for text rendering inside images and flexible aspect ratios. Particularly useful when you need precise aspect ratio control (including ultrawide 21:9) or when the image needs to include legible text. Priced at a low flat $0.01 USDC per call via x402 micropayment protocol, making it cost-effective for single or moderate-volume generation tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":251,"lastUsedAt":"2026-09-12T13:04:50.438Z","lastSuccessfullyRanAt":"2026-09-07T04:58:59.868Z","lastHealthCheckAt":"2026-09-14T21:21:00.194Z","isFirstParty":false}