# AGISHub Image Generation

> AGISHub Image Generation 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: GET https://api.agishub.com/v1/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-image-generation-daae7b68
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oHL3AjUEaX4Uul1pAP2EK

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-image-generation-daae7b68
```

Example prompt: Generate an image of a golden retriever playing fetch on a sunny beach, using 6 diffusion steps for higher quality.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call text-to-image generation without managing model infrastructure. It is ideal for agents that occasionally need to produce images on demand and want a simple GET-based interface returning base64 PNG. The 1–8 diffusion steps parameter allows trading speed for quality. Prefer alternatives if you need high-resolution outputs, fine-tuned style control, or image-to-image workflows.

## Known failure modes

- Empty or missing prompt returns a 400 error
- Steps value outside 1–8 range returns a 400 validation error
- Payment not provided or insufficient triggers a 402 response
- Prompt may be rejected if it violates content policies
- Timeout possible for high step counts under heavy server load

## 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 decode and display or save to disk.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "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
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "Generate an image from a text prompt (returned base64-encoded PNG)."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-image-generation-daae7b68/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)
