# agent402.tools Premium Image Generation

> agent402.tools Premium Image Generation is a paid API for AI agents from agent402.tools, paid per call via x402, $0.3/call, status unknown (last checked 2026-09-14).

Generates a 1024x1024 premium PNG image from a text prompt using GPT Image 2 (medium quality), returning the result as a base64-encoded PNG via pay-per-call x402 payment.

## Facts

- Endpoint: POST https://agent402.tools/api/image-gen-premium
- Price: $0.3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-premium-image-generation-46cc640c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XFzLdoq6jX_nzP5o7tN5R

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 agent402-tools-premium-image-generation-46cc640c -d '<json body>'
```

Example prompt: Generate a premium 1024x1024 image of a lone astronaut standing on a red Mars landscape at sunset, with Earth visible in the sky and dramatic orange lighting — use GPT Image 2 for maximum detail.

## When to prefer this

Choose this endpoint when you need a high-detail, coherent AI-generated image using GPT Image 2 without managing your own API key, and are willing to pay $0.30 USDC per call via x402. Prefer this over standard/economy alternatives when image quality and detail are priorities. It is ideal for agents that need on-demand image generation with crypto-native pay-per-call billing.

## Known failure modes

- Prompt exceeds 4000 characters — request rejected with validation error
- Payment via x402 fails or is insufficient — request blocked
- Model unavailable or overloaded — server error returned
- Prompt contains disallowed content — content policy rejection
- Network timeout during image generation — no image returned

## How this service works

Generate a premium image from a text prompt using GPT Image 2 (medium quality, 1024x1024). Flagship model with best detail and coherence. No API key needed; pay per call via x402. Returns base64 PNG. Prompt capped at 4000 chars.

## Output

A base64-encoded PNG image at 1024x1024 resolution generated by GPT Image 2 at medium quality, reflecting the input prompt with high detail and coherence.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string",
   "description": "Text description of the desired image (max 4000 chars)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "size": "1024x1024",
  "image": "<base64-encoded PNG>",
  "model": "gpt-image-2",
  "quality": "medium",
  "provider": "openai",
  "revised_prompt": "A single red apple on a white background"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-premium-image-generation-46cc640c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
