# Cluster Protocol Image Generation

> Cluster Protocol Image Generation is a paid API for AI agents from api.clusterprotocol.ai, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Generates images from text prompts using selectable image models, returning image URLs or base64 JSON

## Facts

- Endpoint: POST https://api.clusterprotocol.ai/v1/images/generations?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cluster-protocol-image-generation-0bf52141
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_seT39i-xPRGmDvRZcZk3l

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 cluster-protocol-image-generation-0bf52141 -d '<json body>'
```

Example prompt: Using Cluster Protocol, generate 2 images of a futuristic cityscape at sunset with neon lights reflecting on wet streets, using the stable-diffusion model at 1024x1024.

## When to prefer this

Choose this endpoint when you need programmatic image generation via the x402 micropayment protocol (USDC per call) and want flexibility to specify model slug, image count (1-4), and output dimensions. It is well-suited for agent workflows that need to generate images on demand without a subscription, paying only per generation.

## Known failure modes

- Invalid or unsupported model slug returns an error
- Prompt that violates content policy may be rejected
- n outside the 1–4 range causes a validation error
- Malformed size string (not in WxH format) may cause failure
- Payment failure or insufficient USDC balance blocks the call
- Overly long or complex prompts may be truncated or rejected

## How this service works

Liberation Engine for Internet Capital Market

## Output

Returns a JSON object containing a data array where each element has either a url field (public link to the generated image) or a b64_json field (base64-encoded image data), corresponding to the number of images requested.

## Request schema (JSON Schema)

```json
{
 "input": {
  "type": "object",
  "required": [
   "model",
   "prompt"
  ],
  "properties": {
   "n": {
    "type": "integer",
    "maximum": 4,
    "minimum": 1
   },
   "size": {
    "type": "string",
    "description": "Dimensions (e.g. '1024x1024')"
   },
   "model": {
    "type": "string",
    "description": "Image model slug"
   },
   "prompt": {
    "type": "string",
    "description": "Text prompt describing the image"
   }
  }
 },
 "output": {
  "type": "object",
  "properties": {
   "data": {
    "type": "array",
    "items": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "b64_json": {
       "type": "string"
      }
     }
    }
   }
  }
 },
 "properties": {
  "input": {
   "required": [
    "method"
   ],
   "properties": {
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    }
   }
  }
 }
}
```

## More

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