# Aile Image Edits via Premium AI Models

> Aile Image Edits via Premium AI Models is a paid API for AI agents from api.aile.sh, paid per call via x402, $0.01575/call, status unknown (last checked 2026-10-11).

Edit or modify an input image based on a text prompt using premium AI image models, settled per-call in USDC on Solana.

## Facts

- Endpoint: POST https://api.aile.sh/v1/images/edits?utm_source=zero.xyz
- Price: $0.01575/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aile-image-edits-via-premium-ai-models-4f214166
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HtkDbI8eYMhxzYwIWE7Hr

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 aile-image-edits-via-premium-ai-models-4f214166 -d '<json body>'
```

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

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "data": [
  {
   "b64_json": "iVBORw0KGgo…"
  }
 ],
 "created": 1760000000
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aile-image-edits-via-premium-ai-models-4f214166/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aile.sh](https://www.zero.xyz/host/api.aile.sh/llms.txt)
