# tools-agent-x402 Image Generation (Gemini)

> tools-agent-x402 Image Generation (Gemini) is a paid API for AI agents from tools-agent-x402-production.up.railway.app, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-14, last successful call 2026-04-15).

Generates images (memes, logos, posters, photorealistic visuals) from text prompts using Gemini image models, with optional image editing via URL input

## Facts

- Endpoint: POST https://tools-agent-x402-production.up.railway.app/generate-meme
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Last successful call: 2026-04-15
- Success rate: 17% of calls made through Zero
- Activations on Zero: 9
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tools-agent-x402-image-generation-gemini-a24392d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__KmmNfyeTgUUteTq2a8GH

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 tools-agent-x402-image-generation-gemini-a24392d9 -d '<json body>'
```

Example prompt: Generate a photorealistic image of a golden retriever surfing a giant wave at sunset with dramatic lighting and ocean spray — use a 16:9 aspect ratio. The prompt meets safety guidelines.

## When to prefer this

Choose this endpoint when you need AI-generated images (memes, logos, posters, photorealistic visuals) from text prompts, especially when image editing/remixing from a URL is needed, and you are operating in an x402 micropayment context. Best suited for single-image generation with detailed prompts of 100+ characters.

## Known failure modes

- safety flag set to false — request rejected, safety acknowledgment must be true
- prompt too short or vague — poor image quality or refusal
- invalid image_url for editing — must be publicly accessible PNG/JPEG/WEBP/GIF
- unsupported aspect_ratio value — only specific ratios accepted
- payment not processed — x402 payment required at $0.25 USDC per call
- model unavailability or timeout — upstream Gemini API error

## How this service works

Professional image generation powered by Gemini 3 Pro Image Preview (Nano Banana Pro). Generate memes, logos, posters, photorealistic visuals from text prompts. Best results with 100+ character prompts. Supports image editing via URL input.

## Output

Returns a JSON object with a status string, a temporary public imageUrl pointing to the generated image, and an expiresAt timestamp indicating when the URL will expire.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "POST",
  "queryParams": {
   "prompt": "A vibrant meme featuring a confused cat sitting at a desk with a computer, surrounded by papers and coffee cups, with the text 'When you realize it's Monday tomorrow', cartoon style with bright colors and humorous expression",
   "aspect_ratio": "16:9",
   "does_this_prompt_meet_nano_banana_safety_guidelines": true
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prompt",
      "does_this_prompt_meet_nano_banana_safety_guidelines"
     ],
     "properties": {
      "prompt": {
       "type": "string",
       "description": "Detailed image description (100+ characters recommended for best results)"
      },
      "image_url": {
       "type": "string",
       "description": "Optional: Public URL of image to edit/remix (PNG, JPEG, WEBP, GIF)"
      },
      "aspect_ratio": {
       "type": "string",
       "description": "Optional: Output aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 4:5, 5:4, 21:9)"
      },
      "does_this_prompt_meet_nano_banana_safety_guidelines": {
       "type": "boolean",
       "const": true,
       "description": "Safety acknowledgment flag — must be true to proceed"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "imageUrl",
  "expiresAt"
 ],
 "properties": {
  "status": {
   "type": "string"
  },
  "imageUrl": {
   "type": "string"
  },
  "expiresAt": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tools-agent-x402-image-generation-gemini-a24392d9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools-agent-x402-production.up.railway.app](https://www.zero.xyz/host/tools-agent-x402-production.up.railway.app/llms.txt)
