{"uid":"cap_HtkDbI8eYMhxzYwIWE7Hr","slug":"aile-image-edits-via-premium-ai-models-4f214166","name":"Aile Image Edits via Premium AI Models","description":"Rent trusted AI models priced per token; lend idle subscriptions and API keys. A live, metered market that settles every call in USDC on Solana.","url":"https://api.aile.sh/v1/images/edits?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["model","images","prompt"],"properties":{"n":{"type":"integer"},"mask":{"type":"object","description":"Optional mask image, `{image_url}`."},"size":{"type":"string"},"model":{"type":"string","description":"`<provider>/<model>`, e.g. `openrouter/black-forest-labs/flux.2-pro`. GET /v1/models?output_modalities=image lists what is servable, with prices."},"images":{"type":"array","description":"The input images, each `{image_url}`: an https URL or a data:image/…;base64 URI. Multipart `image[]` uploads are accepted too."},"prompt":{"type":"string","description":"The change to make."}}},"responseSchema":{"data":[{"b64_json":"iVBORw0KGgo…"}],"created":1760000000},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01575","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.01575/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01575","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01575","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HfQW4veXe1L3Lssp4Trbc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01575","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Edit or modify an input image based on a text prompt using premium AI image models, settled per-call in USDC on Solana.","exampleAgentPrompt":"Using the openrouter/black-forest-labs/flux.2-pro model on Aile, edit this image (https://example.com/photo.jpg) to replace the sky with a dramatic sunset — give me 1 result at 1024x1024.","exampleUseCases":[{"title":"AI product photo background swap","prompt":"I have a product shot at https://cdn.myshop.com/sneaker.jpg — use openrouter/black-forest-labs/flux.2-pro on Aile to replace the plain white background with a clean urban street scene, 1024x1024, 1 result."},{"title":"Portrait background removal and replacement","prompt":"Take this portrait photo at https://photos.example.com/portrait.jpg and use Aile with openrouter/black-forest-labs/flux.2-pro to replace the background with a blurred office interior, keep the person exactly as-is, output 1 image at 1024x1024."},{"title":"Inpainting object removal from scene","prompt":"Can you use Aile's image edit endpoint with the flux.2-pro model to remove the trash can from the lower right of this image https://example.com/street.jpg and fill it with matching pavement? One output, standard square size."}],"resultDescription":"Returns a JSON object with a 'data' array containing one or more objects each with a 'b64_json' field (base64-encoded PNG of the edited image), plus a 'created' Unix timestamp.","failureModes":["Invalid or inaccessible image URL returns an error","Unsupported model identifier causes a 400 or model-not-found error","Insufficient USDC balance or payment failure results in a 402 Payment Required","Image too large or unsupported format causes a rejection","Mask image dimensions mismatch with input image","Rate limits or model unavailability on the upstream provider"],"whenToPreferThis":"Choose this endpoint when you need to edit or transform an existing image using a text prompt via premium models (e.g. FLUX) and want per-call USDC micropayment billing without a subscription, or when you need access to models not available on standard platforms. Prefer over raw provider APIs when you want a unified marketplace interface with Solana settlement.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T04:29:57.508Z","isFirstParty":false,"canonicalSlug":"aile-image-edits-via-premium-ai-models-4f214166"}