# sol.blockrun.ai Image-to-Image Editing API

> sol.blockrun.ai Image-to-Image Editing API is a paid API for AI agents from sol.blockrun.ai, paid per call via x402, $0.023/call, status unknown (last checked 2026-09-15).

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

## Facts

- Endpoint: POST https://sol.blockrun.ai/api/v1/images/image2image
- Price: $0.023/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 6
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sol-blockrun-ai-image-to-image-editing-api-382df1b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9VkzaToDffMR9-qsPAuZq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sol-blockrun-ai-image-to-image-editing-api-382df1b9 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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)

## How this service works

AI image editing API - edit images with USDC on Solana

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sol-blockrun-ai-image-to-image-editing-api-382df1b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sol.blockrun.ai](https://www.zero.xyz/host/sol.blockrun.ai/llms.txt)
