# Compacthost AI Tools – Kontext Image Editing

> Compacthost AI Tools – Kontext Image Editing is a paid API for AI agents from x402.compacthost.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-14).

Edit or transform a reference photo using a text prompt, returning a new PNG image via pay-per-call x402 billing on Base.

## Facts

- Endpoint: POST https://x402.compacthost.com/kontext
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/compacthost-ai-tools-kontext-image-editing-ee4d8525
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BLHQeiJAFbqEAsLH2DnBG

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 compacthost-ai-tools-kontext-image-editing-ee4d8525 -d '<json body>'
```

Example prompt: Take this photo of our living room and edit it so the walls are painted sage green and there's warm afternoon sunlight coming through the windows — output at 1024x768.

## When to prefer this

Choose this endpoint when you need instruction-guided image editing from a reference photo (inpainting, style transfer, scene modification) and want pay-per-call billing settled in USDC on Base via x402 — ideal for autonomous agents that need verifiable, on-chain micropayments without subscription overhead. Prefer over text-to-image endpoints when a source image must be preserved and modified rather than generated from scratch.

## Known failure modes

- Reference image exceeds ~10MB base64 limit — request rejected
- Malformed base64 string causes decoding error
- Prompt too vague or contradictory — output may not match intent
- Payment insufficient or x402 handshake fails — 402 response with payment details
- Size parameter in wrong format (not WxH) — may default or error
- Server-side model timeout for complex edits

## How this service works

Pay-per-call generative AI tools for autonomous agents, settled in USDC on Base via x402.

## Output

A PNG image returned as binary (image/png content type) reflecting the edits described by the prompt applied to the reference photo. The output dimensions match the requested size (default 832x1216 if not specified).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "string",
   "description": "WxH, default 832x1216"
  },
  "prompt": {
   "type": "string",
   "description": "What to change"
  },
  "reference_image": {
   "type": "string",
   "description": "Base64-encoded source photo, max ~10MB"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "image/png"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/compacthost-ai-tools-kontext-image-editing-ee4d8525/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.compacthost.com](https://www.zero.xyz/host/x402.compacthost.com/llms.txt)
