# x402img AI Image Generation

> x402img AI Image Generation is a paid API for AI agents from api.x402img.com, paid per call via x402, $0.02/call, status down (last checked 2026-10-13).

Generates AI images from text prompts with three selectable quality tiers (fast, quality, premium) via micropayment

## Facts

- Endpoint: POST https://api.x402img.com/api/generate-image?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402img-ai-image-generation-f4a09974
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3FCVge5J9Yoi6qEFW7BMw

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 x402img-ai-image-generation-f4a09974 -d '<json body>'
```

Example prompt: Generate an image of a cozy mountain cabin in winter with snow on the roof and warm light glowing from the windows — use the quality tier for a crisp, high-detail result.

## When to prefer this

Choose this endpoint when you need AI-generated images with selectable quality tiers and per-call micropayment pricing via x402. The fast tier ($0.02) is ideal for quick drafts and iteration; the quality tier ($0.10) suits production assets; the premium tier ($0.20) is best when text rendering accuracy and maximum image fidelity are required. Prefer this over alternatives when your agent stack already supports x402 payment protocol and you want cost-controlled generation without subscription commitments.

## Known failure modes

- Invalid or empty prompt returns an error response with success: false
- Unsupported tier value causes a validation error
- Payment not received or insufficient funds results in a 402 Payment Required response
- Image URL expires after the expiresAt timestamp, making the link inaccessible
- Network timeout for premium tier due to longer generation time
- Content policy violation on prompt may result in rejected generation

## How this service works

Pay-per-call image generation API for AI agents. Three quality tiers: fast ($0.02), quality ($0.10), premium ($0.20).

## Output

Returns a JSON object containing a temporary URL to the generated image (imageUrl), an expiration timestamp (expiresAt), the model used, the quality tier selected, a success boolean, and an optional notice message. The image URL is time-limited and should be downloaded promptly.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "prompt"
 ],
 "properties": {
  "tier": {
   "enum": [
    "fast",
    "quality",
    "premium"
   ],
   "type": "string",
   "description": "Quality tier: 'fast' = $0.02 (quick drafts), 'quality' = $0.10 (high quality), 'premium' = $0.20 (best quality, text rendering). Default: fast"
  },
  "prompt": {
   "type": "string",
   "description": "Text description of the desired image"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tier": {
   "type": "string"
  },
  "model": {
   "type": "string"
  },
  "notice": {
   "type": "string"
  },
  "success": {
   "type": "boolean"
  },
  "imageUrl": {
   "type": "string"
  },
  "expiresAt": {
   "type": "string",
   "format": "date-time"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402img-ai-image-generation-f4a09974/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402img.com](https://www.zero.xyz/host/api.x402img.com/llms.txt)
