# ALFRED x402 Image Generation

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

Generates images from a text prompt via a self-hosted Lightning/x402 paid API, with optional quality mode selection.

## Facts

- Endpoint: POST https://x402.wallace.us/x402/generate-image
- Price: $2.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alfred-x402-image-generation-193dd408
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SlWeIEa78nULwi-CoZbmA

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-generation-193dd408 -d '<json body>'
```

Example prompt: Generate a high-quality image of a futuristic city skyline at sunset — use schnell quality mode.

## When to prefer this

Choose this endpoint when you need text-to-image generation via a self-hosted, pay-per-use x402/Lightning micropayment API — especially when you want per-call pricing at $2.10 USDC with no subscription required and results cached by payment hash. Prefer this over hosted SaaS image generators when operating in a Lightning/x402 payment context or when the requester specifically wants ALFRED's self-hosted toolset.

## Known failure modes

- HTTP 402 returned if no valid Lightning payment has been made — client must pay the invoice in the response body and retry with X-Payment-Hash header
- Invalid or expired payment hash results in re-issuance of invoice
- Unsupported quality value may produce an error or fall back to default
- Prompt too long or empty may result in a 400 Bad Request
- Self-hosted service may have downtime or rate limits not publicly documented

## 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 generated image (exact format unspecified in schema; likely an image URL, base64 data, or binary blob) keyed to the payment hash. Results are cached per payment hash so retrying the same paid request does not incur a second charge.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string"
  },
  "quality": {
   "type": "string",
   "description": "(dev|schnell, optional)"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/alfred-x402-image-generation-193dd408/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)
