# pixel402 AI Image Generator

> pixel402 AI Image Generator is a paid API for AI agents from pixel402.dylan-caponi.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Generates AI images from text prompts using flux-schnell, paid per-image with $0.01 USDC on Base via x402, with async claim-check retrieval

## Facts

- Endpoint: POST https://pixel402.dylan-caponi.workers.dev/generate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pixel402-ai-image-generator-6c45badf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_z2z2ZvBTuSR48IK0GgbcH

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 pixel402-ai-image-generator-6c45badf -d '<json body>'
```

Example prompt: Generate an image of a fox astronaut floating in space with Earth in the background — square format, webp, high quality.

## When to prefer this

Choose pixel402 when you need on-demand AI image generation paid per-image with USDC on Base via the x402 protocol, without subscription overhead. Ideal for agents needing crypto-native pay-as-you-go image generation powered by flux-schnell with durable async retrieval — especially when the user already operates in a Web3 or Base ecosystem.

## Known failure modes

- Payment failure — insufficient USDC balance or x402 payment not accepted, resulting in 402 response
- Prompt policy violation — prompt rejected for content policy, resulting in 4xx error
- Timeout or generation failure — model backend unavailable, job may remain in 'processing' indefinitely
- Invalid input schema — malformed request body returns 400
- Rate limiting — too many requests from the same origin

## How this service works

Generate 1-4 AI images from a text prompt using flux-schnell. $0.01 per image (price = $0.01 × num_outputs). Returns a job_id claim ticket; retrieve images free at /result/{job_id} (durable, no expiry).

## Output

Returns a JSON object containing a job_id, status (succeeded or processing), image_url where the generated image can be retrieved for free anytime, result_url for polling if still processing, the original prompt, model used (flux-schnell), image parameters (aspect_ratio, output_format, output_quality), price_paid, and a prediction_id. If status is 'processing' (HTTP 202), the agent should poll result_url every ~10 seconds until complete.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "example": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Image stored durably. GET image_url anytime (free). If status is 'processing' (HTTP 202), poll result_url every ~10s.",
  "model": "black-forest-labs/flux-schnell",
  "job_id": "6f1c9e2a-4b7d-4c1e-9a2f-3d5e8b7a0c1d",
  "prompt": "a cat wearing a top hat in a field of sunflowers",
  "status": "succeeded",
  "image_url": "https://pixel402.dylan-caponi.workers.dev/result/6f1c9e2a-4b7d-4c1e-9a2f-3d5e8b7a0c1d",
  "parameters": {
   "aspect_ratio": "1:1",
   "output_format": "webp",
   "output_quality": 80
  },
  "price_paid": "$0.01",
  "prediction_id": "abc123xyz"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pixel402-ai-image-generator-6c45badf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pixel402.dylan-caponi.workers.dev](https://www.zero.xyz/host/pixel402.dylan-caponi.workers.dev/llms.txt)
