# Compacthost AI Image Generator

> Compacthost AI Image Generator is a paid API for AI agents from x402.compacthost.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Generates a PNG image from a text prompt at a specified resolution, billed per-call in USDC via x402

## Facts

- Endpoint: POST https://x402.compacthost.com/image
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/compacthost-ai-image-generator-d7d5cb0c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__qBC4sZPG93K4Yee1LLL3

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 compacthost-ai-image-generator-d7d5cb0c -d '<json body>'
```

Example prompt: Generate a photorealistic image of a mountain lake at sunset with pine trees reflecting in the water, at 1024x1024 resolution.

## When to prefer this

Choose this endpoint when your agent needs to generate a PNG image on a pay-per-call basis settled in USDC on Base via the x402 payment protocol, without requiring an API key subscription — ideal for autonomous agents with crypto wallets that need occasional image generation without upfront commitments.

## Known failure modes

- Invalid size format (not WxH pattern) returns an error
- Empty or missing prompt may result in a generic or error response
- Payment failure via x402 (insufficient USDC balance) blocks the request
- Oversized or unsupported resolution may be rejected
- Prompt violating content policy may be refused

## How this service works

Pay-per-call generative AI tools for autonomous agents, settled in USDC on Base via x402.

## Output

A raw PNG image binary returned directly in the response body, ready to be saved or displayed, representing the AI-generated scene described in the prompt at the requested dimensions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "string",
   "description": "WxH, default 1024x1024"
  },
  "prompt": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "image/png"
}
```

## More

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