# ALFRED x402 Image Upscale

> ALFRED x402 Image Upscale is a paid API for AI agents from x402.wallace.us, paid per call via x402, $0.3/call, status unknown (last checked 2026-09-14).

Upscales an image by 2x or 4x using ESRGAN or hires_fix model, paid per-call via Lightning/x402 protocol

## Facts

- Endpoint: POST https://x402.wallace.us/x402/image-upscale
- Price: $0.3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alfred-x402-image-upscale-5804d86d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LNekFTsET4crdISuKCKif

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-upscale-5804d86d -d '<json body>'
```

Example prompt: Can you upscale my image (ID: abc123) to 4x using the esrgan mode? I want the sharpest result possible.

## When to prefer this

Use this endpoint when you need AI-powered image super-resolution (ESRGAN or hires_fix) on demand, pay-per-use via Lightning/x402 without a subscription. Ideal for agents that need occasional image upscaling at low cost ($0.30 USDC per call) without committing to a SaaS plan.

## 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 image_id returns an error if the image cannot be found
- Unsupported factor value (anything other than 2 or 4) may cause a bad request error
- Invalid mode string (not esrgan or hires_fix) may cause processing failure
- Network timeout if upscaling is slow for large images
- Payment hash not recognized or already expired

## 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 upscaled image result (likely a URL or image data), cached per payment_hash so retrying with the same payment doesn't charge again.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "type": "string",
   "description": "(esrgan|hires_fix, optional)"
  },
  "factor": {
   "type": "string",
   "description": "(2 or 4)"
  },
  "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-upscale-5804d86d/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)
