# AGISHub Text-to-Image Generator

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

Generates a PNG image from a text prompt using diffusion, returning it base64-encoded.

## Facts

- Endpoint: POST https://api.agishub.com/paid/generate-image
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-text-to-image-generator-e480de73
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WGIakFEX6cv-vB4UIVeX7

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 agishub-text-to-image-generator-e480de73 -d '<json body>'
```

Example prompt: Can you generate an image of a serene mountain lake at sunset with golden reflections on the water, using 6 diffusion steps for higher quality?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call AI image generation capability without managing API keys or model infrastructure, especially in agentic workflows where x402 micropayment support is required. It is well-suited for low-volume, on-demand image creation with adjustable quality via diffusion steps.

## Known failure modes

- Empty or missing prompt parameter returns a validation error
- Diffusion steps value outside 1-8 range returns a parameter error
- Very long or complex prompts may produce unexpected or degraded results
- Payment not provided or insufficient USDC balance results in a 402 Payment Required response
- Server-side generation timeout for highly complex prompts

## How this service works

Generate an image from a text prompt (returned base64-encoded PNG).

## Output

A JSON object containing the generated image as a base64-encoded PNG string, ready to be decoded and rendered or saved as an image file.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "steps": {
       "type": "integer",
       "maximum": 8,
       "minimum": 1,
       "description": "Diffusion steps (1-8, default 4). More = higher quality but slower."
      },
      "prompt": {
       "type": "string",
       "minLength": 1,
       "description": "Text description of the image to generate."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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