{"uid":"cap_VwP-CEgq6ClWaMM6C0lSd","slug":"api-x-router-ai-b0052140","name":"X-Router Text-to-Image Generation","description":"Text-to-Image Generation","url":"https://api.x-router.ai/v1/images/generate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["prompt"],"properties":{"seed":{"type":"number","description":"Random seed for reproducibility"},"model":{"type":"string","description":"Image model to use"},"steps":{"type":"number","description":"Number of inference steps (1-50)"},"width":{"type":"number","description":"Image width in pixels, must be divisible by 64 (128-2048, default: 1024)"},"height":{"type":"number","description":"Image height in pixels, must be divisible by 64 (128-2048, default: 1024)"},"prompt":{"type":"string","description":"Text description of the image to generate (2-3000 chars)"},"guidance":{"type":"number","description":"Guidance scale for generation (1-30)"},"numberResults":{"type":"number","description":"Number of images to generate (1-4, default: 1)"},"negativePrompt":{"type":"string","description":"Negative prompt to avoid certain elements (max 3000 chars)"}}},"responseSchema":{"model":{"type":"string","description":"Model used for generation"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"CDN URL of the generated image"},"uuid":{"type":"string","description":"Unique identifier for the image"}}},"description":"Array of generated image objects"}},"example":{"request":{"seed":42,"steps":30,"width":1024,"height":1024,"prompt":"A serene mountain landscape with snow-capped peaks and a calm alpine lake at sunset, photorealistic style","guidance":7.5,"numberResults":1},"response":{"model":"flux-schnell","images":[{"url":"https://im.runware.ai/image/os/w02d10/ws/3/ii/e1c63695-369a-4db6-a335-b51e11bc590b.jpg","cost":0.0058,"uuid":"e1c63695-369a-4db6-a335-b51e11bc590b"}]}},"exampleRequest":{"seed":42,"steps":30,"width":1024,"height":1024,"prompt":"A serene mountain landscape with snow-capped peaks and a calm alpine lake at sunset, photorealistic style","guidance":7.5,"numberResults":1},"tags":["x402"],"displayCostAmount":"0.005694","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":1,"rating":{"score":"0.75","successRate":"0.60","reviews":1,"stars":"4.0","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005694/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005694","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005694","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eUVB9RHFTOEdbm3RmNia0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005694","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates images from text prompts using configurable AI image models, returning CDN-hosted image URLs","exampleAgentPrompt":"Generate a photorealistic image of a serene mountain landscape with snow-capped peaks and a calm alpine lake — make it 1024x1024 pixels, use 30 inference steps, a guidance scale of 7.5, and set seed 42 so it's reproducible.","exampleUseCases":null,"resultDescription":"Returns an array of generated image objects, each containing a CDN URL to the image and a unique UUID identifier, along with the model name used for generation.","failureModes":["Missing X-PAYMENT header returns 402 with payment instructions and accepted asset details","Invalid prompt length (below 2 or above 3000 chars) causes validation error","Width or height not divisible by 64 or outside 128-2048 range causes rejection","Steps outside 1-50 range or numberResults outside 1-4 range causes parameter error","Guidance scale outside 1-30 range returns validation error","Unsupported model name causes model-not-found error","Payment insufficient or on wrong network causes payment rejection"],"whenToPreferThis":"Choose this endpoint when you need to generate images from text descriptions via an x402-payment-gated API on the Base network, especially when you want fine-grained control over inference steps, guidance scale, image dimensions, and seed reproducibility. Prefer this over other text-to-image APIs when operating in a crypto-native payment context or when you need CDN-hosted output URLs with unique identifiers per image.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":9,"lastUsedAt":"2026-07-17T22:09:42.939Z","lastSuccessfullyRanAt":"2026-06-16T18:08:14.945Z","lastHealthCheckAt":"2026-10-11T14:31:36.118Z","isFirstParty":false,"canonicalSlug":"api-x-router-ai-b0052140"}