{"uid":"cap_e0vCOAvTQB5341yrtA3sP","slug":"x402-gateway-production-up-railway-app-ca5124a6","name":"Google Imagen Nano Image Generation with Aspect Ratio Control","description":"Google's fast, high-quality image generation with aspect ratio control and optional web search","url":"https://x402-gateway-production.up.railway.app/api/image/nano-banana?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"type":"object","required":["prompt"],"properties":{"seed":{"type":"number","example":42,"description":"Random seed for reproducibility"},"prompt":{"type":"string","example":"a cyberpunk cityscape at sunset with neon signs","description":"Text description of image to generate (up to 50,000 chars)"},"aspect_ratio":{"type":"string","default":"1:1","example":"16:9","description":"Output aspect ratio (auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16)"},"output_format":{"type":"string","default":"png","example":"png","description":"Image format: png, jpeg, or webp"}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"prompt":"A serene Japanese mountain temple surrounded by morning mist and cherry blossoms at sunrise","webSearch":true,"aspectRatio":"16:9"},"response":{"seed":0,"model":"fal-ai/nano-banana-2","images":[{"url":"https://v3b.fal.media/files/b/0a9e15ca/_CBfuC2bhSQ4BqZMknZJ4_oeb0tvOR.png","width":1024,"height":1024}],"inference_time_ms":13134}},"exampleRequest":{"prompt":"A serene Japanese mountain temple surrounded by morning mist and cherry blossoms at sunrise","webSearch":true,"aspectRatio":"16:9"},"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":1,"rating":{"score":"0.67","successRate":"1.00","reviews":1,"stars":"3.7","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TaftQNAVox5H200Rlp7CT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates high-quality images using Google's Imagen Nano model with aspect ratio control and optional web search augmentation","exampleAgentPrompt":"Generate a photorealistic image of a misty Japanese mountain temple at sunrise in a 16:9 widescreen aspect ratio using Google Imagen — also search the web to make the scene more accurate.","exampleUseCases":[{"title":"Social media graphics at exact dimensions","prompt":"I need a professional banner image for our LinkedIn profile in 16:9 format showing a diverse team collaborating in a modern office. Can you generate that with Google's image model?"},{"title":"Product catalog with consistent sizing","prompt":"Create a clean product photo of a minimalist wooden desk lamp in 1:1 square format for our e-commerce site. Use Google's Imagen to make it look polished and professional."},{"title":"Marketing materials with web-informed visuals","prompt":"Generate a high-quality portrait-oriented illustration of a sustainable fashion concept for our brand campaign in 9:16 aspect ratio. Search the web first to capture current design trends in eco-friendly clothing."}],"resultDescription":"Returns a generated image (URL or binary image data) produced by Google's Imagen Nano model based on the provided text prompt, honoring the specified aspect ratio and optionally enriched with web search context.","failureModes":["Invalid or missing prompt returns 400 error","Unsupported aspect ratio value returns validation error","Web search augmentation fails silently or returns stale results","Payment not fulfilled returns 402 Payment Required","Model content policy violation causes generation refusal","Timeout on complex or high-resolution prompts"],"whenToPreferThis":"Choose this endpoint when you need high-quality image generation with precise aspect ratio control backed by Google's Imagen Nano model. Prefer this over FLUX Schnell when quality matters more than speed, and over generic generation endpoints when you want optional web search grounding to improve prompt accuracy.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":1,"lastUsedAt":"2026-04-22T15:25:22.086Z","lastSuccessfullyRanAt":"2026-04-22T15:25:22.086Z","lastHealthCheckAt":"2026-10-12T18:37:27.911Z","isFirstParty":false,"canonicalSlug":"x402-gateway-production-up-railway-app-ca5124a6"}