# Koinelix Image Generation

> Koinelix Image Generation is a paid API for AI agents from api.koinelix.com, paid per call via x402, $0.021/call, status unknown (last checked 2026-11-14).

Generate a single image from a text prompt using Koinelix unified models, returned synchronously as a Base64-encoded PNG via x402 micropayment.

## Facts

- Endpoint: POST https://api.koinelix.com/v1/images/generations?utm_source=zero.xyz
- Price: $0.021/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/koinelix-image-generation-8fe7afb0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aYQvQh2XrHqjr_0DDN7xG

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 koinelix-image-generation-8fe7afb0 -d '<json body>'
```

Example prompt: Generate an image of a serene Japanese zen garden at sunrise with cherry blossom petals falling gently, using the gpt-image-2.5 model.

## When to prefer this

Choose this endpoint when you need a single synchronous image generation without creating an account, want pay-per-use pricing at $0.05 USDC, and need to receive the image as Base64 JSON directly in the response. Ideal for anonymous or agent-driven workflows where account management is undesirable. Prefer it over account-based image APIs when low-friction micropayment via x402 is supported, and when you need idempotent retry via payment signature replay.

## Known failure modes

- Payment settled but generation failed — the payment is not refunded; resend with the same PAYMENT-SIGNATURE and body to retry
- Prompt exceeds 6000 UTF-8 bytes — request rejected
- Invalid or unsupported model ID provided — request rejected
- Connection timeout before response arrives — keep connection open for tens of seconds; do not repay
- No x402 payment header included — 402 Payment Required returned

## How this service works

Image generation from a text prompt, with up to 3 optional reference images for editing or combining pictures. Use when an agent needs a picture: text to image, AI image generator, image edit. One image returns as Base64 JSON, usually within tens of seconds. Price: 0.021 USDC per call, paid with x402; no account or API key is needed. An optional platform API key allows up to three attempts per payment.

## Output

A JSON object containing a `data` array with one element holding a `b64_json` field (Base64-encoded PNG image), plus a `created` Unix timestamp and an `output_format` field indicating 'png'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "enum": [
    "gpt-image-2.5",
    "gpt-image-2.5-flare",
    "gpt-image-2.5-sunburst"
   ],
   "type": "string",
   "maxLength": 128,
   "minLength": 1,
   "description": "Optional published Koinelix model ID. Omit it to use the default model (gpt-image-2.5)."
  },
  "prompt": {
   "type": "string",
   "minLength": 1,
   "description": "Text description, up to 6000 UTF-8 bytes."
  },
  "image_b64": {
   "type": "array",
   "items": {
    "type": "string",
    "minLength": 1,
    "contentEncoding": "base64"
   },
   "maxItems": 3,
   "minItems": 1,
   "description": "Optional reference images as standard padded Base64 without a data: prefix, at most 10 MiB decoded in total. Sent after image_urls; at most 3 images in total."
  },
  "image_urls": {
   "type": "array",
   "items": {
    "type": "string",
    "format": "uri",
    "maxLength": 2048,
    "minLength": 1
   },
   "maxItems": 3,
   "minItems": 1,
   "description": "Optional reference image URLs (http or https), passed to the model unchanged. Sent before image_b64; at most 3 images in total."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "b64_json": "<base64 image>"
   }
  ],
  "created": 1767225600,
  "output_format": "png"
 }
}
```

## More

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