# x402-gateway: Text to Image (fast)

> x402-gateway: Text to Image (fast) is a paid API for AI agents from x402.freeq.one, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-16).

Generates an image from a text prompt in 2-6 seconds and returns a permanent hosted HTTPS URL to the result

## Facts

- Endpoint: POST https://x402.freeq.one/tools/image_generate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-text-to-image-fast-b5a417c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mgK9ffToXifIGErbNVrdR

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 x402-gateway-text-to-image-fast-b5a417c3 -d '<json body>'
```

Example prompt: Generate a 1024x1024 image of a knight in golden armor standing on a cliff at sunset — I need it for a game asset.

## When to prefer this

Choose this endpoint when you need a fast (2-6s) AI-generated image from a text prompt at low cost ($0.02 USDC), especially for game assets, avatars, or illustrations, and you want a permanent hosted URL returned without managing storage. Use the premium tier sibling if higher quality and longer generation time (10-30s) is acceptable.

## Known failure modes

- Prompt exceeds 1200 characters — request rejected
- Width or height outside 256-1536px range — validation error
- Payment not received or insufficient USDC balance via x402 — 402 Payment Required
- Prompt contains disallowed content — generation refused
- Generation timeout if upstream model is overloaded

## How this service works

Text to Image (fast): Generate an image from a text prompt (fast tier, 2-6s). Returns a permanent https URL to the hosted image on api.freeq.one/media/*. Game assets, avatars, illustrations, concept art. Pay per call in USDC on Base via x402 — POST https://x402.freeq.one/tools/image_generate.

## Output

A JSON object containing a permanent HTTPS URL (hosted at api.freeq.one/media/*) pointing to the generated image file, accessible directly for download or display.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "width": {
   "type": "integer",
   "example": 1024,
   "description": "Image width in px (256-1536, default 1024)"
  },
  "height": {
   "type": "integer",
   "example": 1024,
   "description": "Image height in px (256-1536, default 1024)"
  },
  "prompt": {
   "type": "string",
   "example": "a cat wearing a tiny hat, studio lighting",
   "description": "Text description of the image to generate (max 1200 chars)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-text-to-image-fast-b5a417c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.freeq.one](https://www.zero.xyz/host/x402.freeq.one/llms.txt)
