# fastapi.online Image Generation

> fastapi.online Image Generation is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.01/call, status down (last checked 2026-10-12).

Generates images from text prompts via a self-hosted AI inference endpoint, billed at $0.02 USDC per call with no signup required

## Facts

- Endpoint: POST https://api.fastapi.online/image?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-image-generation-be710ab4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-U4zxgICBL0C_9smsoJF9

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 fastapi-online-image-generation-be710ab4 -d '<json body>'
```

Example prompt: Generate an image of a serene mountain lake at sunset with pine trees reflecting in the still water — pay with USDC and no signup needed.

## When to prefer this

Choose this endpoint when you need image generation with no signup or subscription, want to pay per call using USDC cryptocurrency, or are building an agent that requires frictionless, pay-as-you-go image synthesis without API key management overhead.

## Known failure modes

- 402 Payment Required if USDC payment is not attached or insufficient
- Invalid or missing prompt results in a 400 Bad Request
- Model inference timeout for complex prompts
- Rate limiting or server overload returning 503
- Malformed payment header causing payment rejection

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns a generated image (as binary data or a URL) produced by the self-hosted AI image generation model based on the provided text prompt, charged at $0.02 USDC per call via x402 payment protocol.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "seed": {
   "type": "integer"
  },
  "steps": {
   "type": "integer",
   "maximum": 30,
   "minimum": 1
  },
  "width": {
   "enum": [
    512,
    768
   ],
   "type": "integer"
  },
  "height": {
   "enum": [
    512,
    768
   ],
   "type": "integer"
  },
  "prompt": {
   "type": "string",
   "maxLength": 1000,
   "minLength": 1
  },
  "negative_prompt": {
   "type": "string",
   "maxLength": 1000
  }
 }
}
```

## More

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