# ALFRED x402 Image Refine

> ALFRED x402 Image Refine is a paid API for AI agents from x402.wallace.us, paid per call via x402, $0.5/call, status unknown (last checked 2026-10-11).

Refines or denoises an existing image using a text prompt, gated by a Lightning/x402 micropayment

## Facts

- Endpoint: POST https://x402.wallace.us/x402/image-refine?utm_source=zero.xyz
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alfred-x402-image-refine-9460a59e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pLRmw8VPjrHlMicc3aLhc

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 alfred-x402-image-refine-9460a59e -d '<json body>'
```

Example prompt: Can you refine image ID 'img_abc123' to make it look more like a golden-hour sunset landscape, with a denoise level of 0.4?

## When to prefer this

Use this endpoint when you need to refine or denoise an existing image (referenced by image_id) using a guiding text prompt, and you are operating in a Lightning/x402 micropayment environment. Prefer this over generic image generation endpoints when you already have a source image and want to improve or transform it rather than generate from scratch.

## Known failure modes

- HTTP 402 returned with Lightning invoice if payment not yet made — must pay invoice and retry with X-Payment-Hash header
- Invalid or missing image_id returns an error
- Denoise value out of 0-1 range may be rejected or clamped
- Payment hash not recognized if invoice expired before payment
- Network timeout on inference backend

## How this service works

Self-hosted personal-assistant paid tools via Lightning. Uses x402-shaped protocol (L402 lineage): HTTP 402 with a Lightning invoice in the response body + WWW-Authenticate header, retry with X-Payment-Hash: <hex> once paid. Results cached per payment_hash so legitimate retries don't cost twice.

## Output

Returns a JSON object containing the refined/denoised image result, cached per payment hash so retries after paying don't incur an additional charge.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string"
  },
  "denoise": {
   "type": "string",
   "description": "(0-1, optional)"
  },
  "image_id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/alfred-x402-image-refine-9460a59e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.wallace.us](https://www.zero.xyz/host/x402.wallace.us/llms.txt)
