# HyperCLI Text-to-Image Generation

> HyperCLI Text-to-Image Generation is a paid API for AI agents from api.hypercli.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Generates an image from a text prompt using a diffusion model, returning an async job handle with status and cancel URLs.

## Facts

- Endpoint: POST https://api.hypercli.com/api/x402/flow/text-to-image
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Success rate: 0% of calls made through Zero
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hypercli-text-to-image-generation-6c3f2a7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LfDLgP8OfRrlUJxnmVQo0

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 hypercli-text-to-image-generation-6c3f2a7a -d '<json body>'
```

Example prompt: Generate an image of a lone astronaut standing on a barren red planet at sunset, dramatic lighting, hyper-realistic style — 1024 pixels wide and 768 pixels tall, no blurry or overexposed areas.

## When to prefer this

Use this endpoint when you need to generate a single image from a text prompt at a fixed low cost ($0.1 USDC) via x402 micropayment, especially in automated agent workflows that can poll a status URL for async completion. Prefer over image-to-image if you have no source image, and over text-to-video/text-to-speech if the output must be a static image.

## Known failure modes

- Payment not provided or insufficient — 402 Payment Required response
- Invalid or missing prompt field — 422 validation error
- Unsupported width/height values — 422 validation error
- Job creation succeeds but rendering fails asynchronously — check status_url for error state
- notify_url webhook unreachable — job completes but no notification delivered

## How this service works

text-to-image — fixed price $0.1

## Output

Returns a JSON object with a render field (job details), an access_key for retrieving results, a status_url to poll for job completion, and a cancel_url to abort the job if needed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "width": {
   "anyOf": [
    {
     "type": "integer"
    },
    {
     "type": "null"
    }
   ],
   "default": null
  },
  "height": {
   "anyOf": [
    {
     "type": "integer"
    },
    {
     "type": "null"
    }
   ],
   "default": null
  },
  "prompt": {
   "type": "string"
  },
  "dry_run": {
   "type": "boolean",
   "default": false
  },
  "negative": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ],
   "default": null
  },
  "notify_url": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ],
   "default": null
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "render": {},
  "access_key": "example",
  "cancel_url": "example",
  "status_url": "example"
 }
}
```

## More

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