# call402.com Image Generation API

> call402.com Image Generation API is a paid API for AI agents from call402.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-17).

Generates an image from a text prompt using fal-ai/flux/schnell, billed at $0.05 USDC per call via the x402 micropayment protocol on Base mainnet.

## Facts

- Endpoint: POST https://call402.com/api/image-generate?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/call402-com-image-generation-api-38e651b2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_suuC6D8BzyEAPYpMdQ1iF

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 call402-com-image-generation-api-38e651b2 -d '<json body>'
```

Example prompt: Generate an image of a futuristic city skyline at night with neon lights reflecting on rain-soaked streets, digital painting style.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call image generation API accessible to AI agents with a crypto wallet, especially in agentic pipelines that use the x402 micropayment protocol on Base mainnet. It is ideal when you want no subscription or API key overhead — just USDC per call. Prefer this over traditional image APIs when your agent stack already supports x402/fetch or any x402 client, and when flux/schnell quality is acceptable for your use case.

## Known failure modes

- 402 Payment Required returned on first call — must pay with x402 client and retry with PAYMENT-SIGNATURE header
- Missing or malformed PAYMENT-SIGNATURE header causes payment rejection
- Empty or missing prompt field causes a request validation error
- Payment on wrong network (not Base mainnet) or wrong token (not USDC) fails settlement
- Rate limits or upstream fal-ai failures may result in 5xx errors

## How this service works

USDC pay-per-call APIs for AI agents via the x402 protocol (v2, exact, Base mainnet). Send a request, receive HTTP 402 with payment requirements, pay with @x402/fetch or any x402 client, retry with the PAYMENT-SIGNATURE header.

## Output

A JSON object containing the echoed prompt, an array of generated images (each with a URL and content_type such as image/png), a seed number for reproducibility, and a meta object describing the source (fal), model (fal-ai/flux/schnell), and images_count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string",
   "description": "Text prompt describing the image to generate (model fixed server-side: fal-ai/flux/schnell)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "prompt",
   "images",
   "seed",
   "meta"
  ],
  "properties": {
   "meta": {
    "type": "object",
    "description": "source, model, images_count"
   },
   "seed": {
    "type": [
     "number",
     "null"
    ]
   },
   "images": {
    "type": "array",
    "description": "Generated images: url, content_type"
   },
   "prompt": {
    "type": "string"
   }
  }
 },
 "example": {
  "meta": {
   "model": "fal-ai/flux/schnell",
   "source": "fal",
   "images_count": 1
  },
  "seed": 12345,
  "images": [
   {
    "url": "https://fal.media/files/example.png",
    "content_type": "image/png"
   }
  ],
  "prompt": "a lighthouse on a cliff at sunset, digital painting"
 }
}
```

## More

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