{"uid":"cap_gMOiwG2MTv3UBvmUO-_6J","slug":"meld402-ai-image-generation-57457d44","name":"meld402 AI Image Generation","description":"14 paid data endpoints for autonomous agents and developers. Covers crypto intelligence (token, chain, Solana, gas), markets (FX, market pulse), location (weather), and research (news, brief). Each route aggregates multiple public sources into one stable schema with a single USDC payment over x402 on Base.","url":"https://meld402.vercel.app/api/ai/image","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mode":{"enum":["text-to-image","image-to-image","upscale"],"type":"string","default":"text-to-image"},"seed":{"type":"integer","maximum":4294967294,"minimum":0,"description":"Random seed"},"model":{"enum":["sd3.5-flash","sd3.5-medium","sd3.5-large","sd3.5-large-turbo","stable-image-ultra","flux","sdxl"],"type":"string","default":"sd3.5-large","description":"Model to use"},"prompt":{"type":"string","maxLength":2000,"minLength":1,"description":"Image generation prompt"},"strength":{"type":"number","default":0.5,"maximum":1,"minimum":0,"description":"Denoising strength for image-to-image"},"cfg_scale":{"type":"number","default":7,"maximum":10,"minimum":1},"creativity":{"type":"number","default":0.3,"maximum":0.5,"minimum":0.1,"description":"Creativity level for upscale"},"aspect_ratio":{"enum":["1:1","16:9","21:9","2:3","3:2","4:5","5:4","9:16","9:21"],"type":"string","default":"1:1"},"image_base64":{"type":"string","description":"Base64 encoded input image (for image-to-image/upscale)"},"style_preset":{"enum":["photographic","digital-art","anime","cinematic","fantasy","line-art","3d-model","origami","pixel-art","texture"],"type":"string"},"output_format":{"enum":["jpeg","png","webp"],"type":"string","default":"png"},"negative_prompt":{"type":"string"}}},"responseSchema":{"type":"json","example":{"data":{"mode":"text-to-image","seed":123456789,"model":"sd3.5-large","cost_usd":0.04,"image_base64":"iVBORw0KGgoAAAANSUhEUgAA...","finish_reason":"success","generation_time_ms":8500},"meta":{"as_of":"2026-08-24T00:00:00.000Z","sources":["stability"],"degraded":[],"attribution":["Image generation by Stability AI (stability.ai)"]}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.5","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.5/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.5","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.5","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZKzf9uIfY0WmmvZbIvmQJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.5","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates, transforms, or upscales images using Stability AI models (SD3.5, FLUX, SDXL) with a single USDC micropayment over x402","exampleAgentPrompt":"Generate a cinematic 16:9 image of a lone astronaut standing on Mars at sunset, photographic style, using the sd3.5-large model — make it dramatic with deep orange skies and long shadows.","exampleUseCases":[{"title":"AI art for social media post","prompt":"Create a square digital-art style image of a neon-lit cyberpunk cityscape at night with flying cars and glowing rain, using the sd3.5-large model."},{"title":"Upscale a product photo","prompt":"I have a low-res product photo I want upscaled and enhanced — here's the base64 image, please upscale it with creativity set to 0.3 using stable-image-ultra."},{"title":"Style-transfer for brand illustration","prompt":"Take this base64 encoded sketch of a coffee shop interior and transform it into a warm, photographic-style image with strength 0.6 using the sd3.5-medium model in a 4:5 aspect ratio."}],"resultDescription":"Returns a JSON object containing the generated image as a base64-encoded string, the model used, generation time in milliseconds, cost in USD, finish reason, a seed for reproducibility, and attribution metadata listing Stability AI as the source.","failureModes":["Invalid or missing prompt returns a validation error","Unsupported model enum value causes a 400 error","Missing image_base64 for image-to-image or upscale mode causes failure","Seed value out of range (>4294967294) causes rejection","Payment failure over x402/Base USDC results in 402 not authorized","Generation timeout if model inference exceeds platform limits","Base64 image malformed or too large may cause processing error"],"whenToPreferThis":"Choose this endpoint when you need image generation with a pay-per-call USDC micropayment model (no subscription required), want access to multiple Stability AI models (SD3.5 variants, FLUX, SDXL) through a single stable schema, or need text-to-image, image-to-image, and upscaling all from one API. Ideal for autonomous agents that need programmatic image creation without managing API keys for multiple providers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:34:15.632Z","isFirstParty":false}