{"uid":"cap_9VkzaToDffMR9-qsPAuZq","slug":"sol-blockrun-ai-image-to-image-editing-api-382df1b9","name":"sol.blockrun.ai Image-to-Image Editing API","description":"AI image editing API - edit images with USDC on Solana","url":"https://sol.blockrun.ai/api/v1/images/image2image","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","maximum":10,"minimum":1},"mask":{"type":"string","description":"Base64 data URI of the mask (optional; OpenAI models only — rejected for google/nano-banana). Must decode to a PNG."},"size":{"type":"string","description":"Exact output size; supported values are model-specific (see GET /api/v1/images/models)"},"image":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":4}],"description":"Source image as a base64 data URI (data:image/<format>;base64,...), or an array of up to 4 images for fusion (OpenAI up to 4, Google nano-banana up to 3). Decoded bytes must be a real PNG, JPEG or WEBP image (Google models also accept HEIC/HEIF) and the base64 must be single-line (no newlines) — validated before the 402. Mislabeled mime types are normalized to the actual byte format."},"model":{"type":"string","description":"Image model (openai/gpt-image-1, openai/gpt-image-2, google/nano-banana, google/nano-banana-pro)"},"prompt":{"type":"string","description":"Text description of the edit"},"quality":{"enum":["low","medium","high","auto"],"type":"string","description":"OpenAI gpt-image only; lower = faster"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.023","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.023/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.023","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.023","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GYq1n7_5RCiYGfmUCP35t","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.023","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Edits or transforms an existing image using a text prompt, supporting OpenAI and Google image models, paid per-request with USDC on Solana via x402","exampleAgentPrompt":"Edit this photo of a coffee shop storefront — replace the daytime sky with a dramatic sunset and add string lights, using the OpenAI gpt-image-1 model at high quality, and give me 1 output in 1024x1024.","exampleUseCases":null,"resultDescription":"Returns one or more edited/transformed images based on the source image(s) and text prompt. The number of images returned corresponds to the 'n' parameter (up to 10). Output format and size depend on the model and 'size' parameter selected. Payment of $0.065 USDC per call is processed via the x402 protocol on Solana before generation.","failureModes":["Invalid or malformed base64 image data — rejected before payment","Unsupported image format for the chosen model (e.g. HEIC with OpenAI)","Mask provided with non-OpenAI model (google/nano-banana rejects mask)","More than 4 source images provided, or more than 3 for Google models","Invalid size value for the chosen model — see GET /api/v1/images/models","Payment failure or insufficient USDC balance on Solana wallet","Model name not recognized or unavailable","Quality parameter provided with Google model (OpenAI only)"],"whenToPreferThis":"Choose this endpoint when you need AI-powered image editing or transformation that accepts an existing image as input and modifies it according to a text prompt — especially when operating in a Solana/crypto-native environment using x402 micropayments. Prefer this over text-to-image endpoints when you have a source image to edit rather than generating from scratch. Supports both OpenAI and Google model families, image fusion from up to 4 images, and optional inpainting via mask.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":6,"lastUsedAt":"2026-08-27T21:53:31.233Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:36:53.526Z","isFirstParty":false}