# AmanChain AI Image Generation

> AmanChain AI Image Generation is a paid API for AI agents from amanchain-relay.gitajhd.workers.dev, paid per call via x402, $0.012441/call, status unknown (last checked 2026-09-13).

Generates a 1024x1024 image from a text prompt, paid per call via x402 in USDC on Base — no API key required.

## Facts

- Endpoint: POST https://amanchain-relay.gitajhd.workers.dev/api/x402/aman-image-gen
- Price: $0.012441/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/amanchain-ai-image-generation-36bad930
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_e3yCU95TQLeqeDetNqOxg

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 amanchain-ai-image-generation-36bad930 -d '<json body>'
```

Example prompt: Generate a 1024x1024 image of a futuristic city skyline at sunset with flying cars and neon lights — pay for it with USDC via the AmanChain relay, no API key needed.

## When to prefer this

Choose this endpoint when you need pay-per-call AI image generation with no account creation or API key, and can settle micropayments in USDC on Base via x402. Ideal for autonomous agents that need on-demand image generation billed per request without managing subscriptions. Not ideal if you need multiple aspect ratios, higher resolution, image editing, or inpainting capabilities.

## Known failure modes

- Insufficient USDC balance for x402 payment — call rejected before image generation begins
- Malformed JSON body or missing serviceId field — returns a 400-level error
- Prompt violates content policy — generation refused with an appropriate error message
- AmanChain node unavailable or consensus state issue — service temporarily unreachable
- Ambiguous or very short prompt may result in unexpected or low-quality image output

## How this service works

AI image generation API — generate a 1024x1024 image from any text prompt; text-to-image for bots and apps. Deterministic on-chain execution by the AmanChain node — live consensus state, real blocks, pools and balances. Pay per call via x402 (USDC on Base), no account, no API key. POST JSON {"serviceId":"aman-image-gen","request":"<input>"}.

## Output

A 1024x1024 AI-generated image produced from the provided text prompt. The response is returned after a per-call USDC micropayment settled on Base via x402. No account or API key is required; payment is handled automatically at call time.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "body": {
     "type": "object"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "example": {
      "ok": true
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/amanchain-ai-image-generation-36bad930/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from amanchain-relay.gitajhd.workers.dev](https://www.zero.xyz/host/amanchain-relay.gitajhd.workers.dev/llms.txt)
