# Spraay AI Image Generation

> Spraay AI Image Generation is a paid API for AI agents from gateway.spraay.app, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-01).

Generates images from text prompts using FLUX Schnell, FLUX Dev, FLUX Pro, or Stable Diffusion XL models via Replicate

## Facts

- Endpoint: POST https://gateway.spraay.app/api/v1/compute/image-generation?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spraay-ai-image-generation-1c01ec0e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NlWJAiUuL3G0qjPhe2M13

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 spraay-ai-image-generation-1c01ec0e -d '<json body>'
```

Example prompt: Generate a photorealistic image of a golden retriever running on a sunny beach at sunset, 1024x768 pixels, using the FLUX Pro model, and give me 1 output.

## When to prefer this

Choose this endpoint when you need programmatic text-to-image generation with a choice of high-quality models (FLUX Schnell for speed, FLUX Dev or Pro for quality, SDXL for broad compatibility) via a pay-per-call x402 micropayment model — ideal for agents that need to generate images on demand without managing Replicate API keys or subscriptions directly.

## Known failure modes

- Invalid or unsupported model name returns an error
- Prompt is empty or missing — required field validation error
- Width or height values outside supported resolution ranges cause failure
- num_outputs exceeding model limits may return partial results or error
- Payment not included or insufficient USDC causes 402 Payment Required
- Replicate backend timeout or model unavailability results in a 503 or gateway error

## How this service works

AI image generation from text prompts. FLUX Schnell, FLUX Dev, FLUX Pro, Stable Diffusion XL via Replicate. Text to image.

## Output

Returns one or more generated image URLs corresponding to the prompt and model specified. The response includes the output images rendered at the requested dimensions by the chosen model (FLUX Schnell, FLUX Dev, FLUX Pro, or Stable Diffusion XL).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string"
  },
  "width": {
   "type": "number"
  },
  "height": {
   "type": "number"
  },
  "prompt": {
   "type": "string"
  },
  "num_outputs": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spraay-ai-image-generation-1c01ec0e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.spraay.app](https://www.zero.xyz/host/gateway.spraay.app/llms.txt)
