# Onchain Router – AI Image Generation (Gemini Flash Lite)

> Onchain Router – AI Image Generation (Gemini Flash Lite) is a paid API for AI agents from llm.agenticfi.wtf, paid per call via x402, $0.002/call, status down (last checked 2026-09-15).

Generates images from a text prompt using Gemini 3.1 Flash Lite, paid per-request with USDC via the x402 protocol, returning a hosted URL or base64 JSON with a durable receipt.

## Facts

- Endpoint: POST https://llm.agenticfi.wtf/v1/images/generations
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-router-ai-image-generation-gemini-flash-lite-57fc5638
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jjT4M5JmqkzVbs7LXbG4z

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 onchain-router-ai-image-generation-gemini-flash-lite-57fc5638 -d '<json body>'
```

Example prompt: Generate a square image of a futuristic neon-lit cityscape at night with flying cars, using the Gemini Flash Lite image model, and give me back a hosted URL.

## When to prefer this

Choose this endpoint when you need AI image generation paid via USDC micropayments per request with no subscription, want a durable hosted image URL with a verifiable payment receipt, or are building an autonomous agent pipeline that requires onchain payment accountability. Prefer this over standard image APIs when USDC-based payment and x402 protocol compatibility are requirements, or when you want provider-neutral routing with a 0% service fee promotion active.

## Known failure modes

- Invalid or missing prompt returns a 400 validation error
- Insufficient USDC balance or failed x402 payment returns a 402 Payment Required error
- Unsupported model name (only 'gemini-3.1-flash-lite-image' accepted) returns a 422 error
- Aspect ratio not '1:1' or image size not '1K' returns a validation error
- Prompt exceeds 4000 characters returns a 400 error
- Requesting n > 1 images returns a validation error
- Service unavailability or upstream Gemini outage returns a 503 error

## How this service works

Image generation · seven-day hosted URL · 0% service fee launch promotion

## Output

Returns a JSON object containing an array of image data (hosted URL or base64 JSON), the model used, the USD price paid, a creation timestamp, image size, and aspect ratio. The hosted URL is durable and access-controlled via a capability token.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "n": {
   "type": "integer",
   "const": 1
  },
  "model": {
   "type": "string",
   "const": "gemini-3.1-flash-lite-image"
  },
  "prompt": {
   "type": "string",
   "maxLength": 4000,
   "minLength": 1
  },
  "image_size": {
   "enum": [
    "1K"
   ],
   "type": "string",
   "default": "1K"
  },
  "aspect_ratio": {
   "enum": [
    "1:1"
   ],
   "type": "string",
   "default": "1:1"
  },
  "response_format": {
   "enum": [
    "url",
    "b64_json"
   ],
   "type": "string",
   "default": "url"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "url": "https://llm.agenticfi.wtf/v1/media/images/00000000-0000-4000-8000-000000000000?access=capability",
    "backed_up": true
   }
  ],
  "model": "gemini-3.1-flash-lite-image",
  "price": {
   "amount": "0.035",
   "currency": "USD"
  },
  "created": 0,
  "image_size": "1K",
  "aspect_ratio": "1:1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-router-ai-image-generation-gemini-flash-lite-57fc5638/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from llm.agenticfi.wtf](https://www.zero.xyz/host/llm.agenticfi.wtf/llms.txt)
