# Image Edit (OpenAI-Compatible, FLUX 3)

> Image Edit (OpenAI-Compatible, FLUX 3) is a paid API for AI agents from agent402.tools, paid per call via x402, $0.02/call, status healthy (last checked 2026-10-30, last successful call 2026-10-27).

Edit an existing image using a text prompt, returning a JPEG output via the OpenAI images.edit wire format, powered by FLUX 3 Image Klein at $0.02 per call.

## Facts

- Endpoint: POST https://agent402.tools/v1/images/edits?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: healthy
- Last checked: 2026-10-30
- Last successful call: 2026-10-27
- Success rate: 100% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 4
- Tags: x402
- Canonical page: https://www.zero.xyz/c/image-edit-openai-compatible-flux-3-d865d261
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_F9GBTbjDNucdIwgpp70kK

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 image-edit-openai-compatible-flux-3-d865d261 -d '<json body>'
```

Example prompt: Take this product photo I'm sending and make it look like it was shot in a snowy forest setting — keep the product the same, just change the background completely.

## When to prefer this

Choose this endpoint when you need to edit or modify an existing image using only a text prompt (no mask required), and want OpenAI images.edit API compatibility. It is ideal for agents already using the OpenAI image editing interface, or when you want low-cost ($0.02/call) FLUX-powered image editing with a simple base64 in/out interface. Prefer this over text-to-image generation endpoints when you have a reference image to start from.

## Known failure modes

- Image too small (minimum 256x256 px) — rejected with validation error
- Image too large (over 6 MB per image) — rejected with payload size error
- More than 4 reference images provided — rejected
- Unsupported image format (non-PNG/JPEG) — rejected
- Prompt exceeds 4,000 characters — rejected
- Payment not included or insufficient — 402 Payment Required
- Model timeout or generation failure — 5xx error after ~10s

## How this service works

Edit an image with a prompt over x402 - OpenAI images.edit wire (reference images and a prompt in, inline base64 out) at $0.02 per picture. Send one to 4 PNG or JPEG reference images (256 px a side or more, up to 6 MB each) as base64 or data: URLs in JSON, or one as a multipart "image" file; the output is one JPEG of about one megapixel that follows the first reference's aspect ratio. Served by FLUX 3 Image Klein in about 10 seconds. No mask: describe the change in the prompt.

## Output

A single JPEG image (~1 megapixel) returned inline as base64, preserving the aspect ratio of the first reference image, reflecting the edits described in the prompt. Typical response time is around 10 seconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "oneOf": [
    {
     "type": "string"
    },
    {
     "type": "array",
     "items": {
      "type": "string"
     },
     "maxItems": 4,
     "minItems": 1
    }
   ],
   "description": "One to 4 reference images, each base64 or a data: URL (PNG or JPEG, at least 256x256, up to 6 MB each). Image URLs are not fetched."
  },
  "prompt": {
   "type": "string",
   "description": "What to change (up to 4,000 chars)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "b64_json": "/9j/4AAQSkZJRgABAQAAAQABAAD…",
    "media_type": "image/jpeg"
   }
  ],
  "model": "black-forest-labs/flux-3-image-klein",
  "usage": {
   "total_tokens": 4107,
   "prompt_tokens": 11,
   "completion_tokens": 4096
  },
  "created": 1750000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/image-edit-openai-compatible-flux-3-d865d261/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
