# imgzen Gemini 2.5 Flash Image (nano-banana)

> imgzen Gemini 2.5 Flash Image (nano-banana) is a paid API for AI agents from api.imgzen.dev, paid per call via x402, $0.02/call, status down (last checked 2026-10-12, last successful call 2026-05-30).

Generates images from text prompts using Google's Gemini 2.5 Flash model, with optional reference images for editing, at $0.02 per image via x402 USDC payment.

## Facts

- Endpoint: POST https://api.imgzen.dev/v1/models/nano-banana/generate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-10-12
- Last successful call: 2026-05-30
- Success rate: 90% of calls made through Zero
- Rating: 1.8 / 5 from 5 reviews
- Activations on Zero: 98
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-imgzen-dev-27650a7b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9fOf8gIyaSdiitQwJkzPV

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 api-imgzen-dev-27650a7b -d '<json body>'
```

Example prompt: Generate a serene mountain landscape with snow-capped peaks and a clear blue sky using Gemini Flash — make it 16:9 widescreen format.

## When to prefer this

Choose this endpoint when you need fast, low-cost image generation at $0.02/image and quality requirements are moderate (1k). Prefer over the nano-banana-pro or nano-banana-2 siblings when cost efficiency is paramount and you don't need best-in-class text rendering or the highest quality output. Ideal for bulk generation, prototyping, or use cases where speed and price matter more than peak quality.

## Known failure modes

- Invalid or unsupported aspect ratio enum value — returns validation error
- Prompt missing or empty — request rejected with 400-level error
- Reference image URL unreachable or base64 malformed — image fetch failure
- Payment via x402 fails or insufficient USDC balance — payment error response
- More than 5 reference images provided — exceeds maxItems constraint
- Model temporarily unavailable from Google backend — 503 or timeout

## How this service works

imgzen — Gemini 2.5 Flash Image (aka nano-banana), fast generation by Google — $0.020/image

## Output

Returns a JSON object with the URL of the generated image hosted on cache.imgzen.dev, the model name (gemini-2.5-flash-image), provider (imgzen-google), generation time in milliseconds, status string, and payment confirmation details (amount in USDC, method x402, currency).

## Example request

```json
{
 "prompt": "A serene mountain landscape with snow-capped peaks and a clear blue sky",
 "quality": "1k",
 "aspect_ratio": "16:9"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 5,
   "description": "Optional reference image(s) for editing (max 5), supports URL and base64"
  },
  "prompt": {
   "type": "string",
   "description": "Text prompt describing the image to generate or edit"
  },
  "quality": {
   "enum": [
    "1k"
   ],
   "type": "string",
   "default": "1k",
   "description": "Output quality: 1k"
  },
  "aspect_ratio": {
   "enum": [
    "1:1",
    "2:3",
    "3:2",
    "3:4",
    "4:3",
    "4:5",
    "5:4",
    "9:16",
    "16:9",
    "21:9"
   ],
   "type": "string",
   "default": "1:1",
   "description": "Image aspect ratio"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "output",
  "status",
  "payment"
 ],
 "properties": {
  "output": {
   "type": "object",
   "required": [
    "url",
    "model",
    "provider",
    "duration_ms"
   ],
   "properties": {
    "url": {
     "type": "string"
    },
    "model": {
     "type": "string"
    },
    "provider": {
     "type": "string"
    },
    "duration_ms": {
     "type": "number"
    }
   }
  },
  "status": {
   "type": "string"
  },
  "payment": {
   "type": "object",
   "required": [
    "amount",
    "method",
    "currency"
   ],
   "properties": {
    "amount": {
     "type": "string"
    },
    "method": {
     "type": "string"
    },
    "currency": {
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-imgzen-dev-27650a7b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.imgzen.dev](https://www.zero.xyz/host/api.imgzen.dev/llms.txt)
