# Recoupable AI Image Generator

> Recoupable AI Image Generator is a paid API for AI agents from api.recoupable.dev, paid per call via x402, $0.15/call, status unknown (last checked 2026-09-14).

Generates an image from a text prompt using AI and returns it as a base64-encoded file with optional Arweave upload

## Facts

- Endpoint: POST https://api.recoupable.dev/api/x402/image/generate
- Price: $0.15/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/recoupable-ai-image-generator-5c2554f7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-OYihNHq6uPxv8RY2YY3I

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 recoupable-ai-image-generator-5c2554f7 -d '<json body>'
```

Example prompt: Generate an image of a futuristic cityscape at night with neon lights reflecting off wet streets and towering skyscrapers.

## When to prefer this

Choose this endpoint when you need AI image generation with built-in x402 micropayment support and optional decentralized Arweave storage. It is ideal for agent workflows that require pay-per-use image creation without subscription overhead, or when permanent on-chain image persistence via Arweave is desirable alongside the generated output.

## Known failure modes

- Invalid or missing text prompt returns an error response
- Arweave upload failure returns an arweaveError string but still provides the base64 image
- Payment not fulfilled (x402 protocol) results in 402 Payment Required before generation
- Prompt violates content policy and is rejected
- Token limits exceeded causing generation failure
- Service timeout for complex or high-resolution generations

## How this service works

Generate an image from a text prompt using AI

## Output

Returns a JSON object containing the generated image as a base64-encoded string with its IANA media type, a fetchable image URL, optional Arweave transaction details for permanent decentralized storage, and token usage statistics (input, output, reasoning, and total tokens consumed).

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "object",
   "properties": {
    "base64": {
     "type": "string",
     "description": "Image as base64 encoded string"
    },
    "mediaType": {
     "type": "string",
     "description": "IANA media type of the image"
    }
   },
   "description": "Generated image file"
  },
  "usage": {
   "type": "object",
   "properties": {
    "inputTokens": {
     "type": "number",
     "description": "Number of tokens used for the prompt"
    },
    "totalTokens": {
     "type": "number",
     "description": "Number of tokens used for the total"
    },
    "outputTokens": {
     "type": "number",
     "description": "Number of tokens used for the output"
    },
    "reasoningTokens": {
     "type": "number",
     "description": "Number of tokens used for the reasoning"
    }
   },
   "description": "Token usage information for the image generation"
  },
  "moment": {
   "type": "object",
   "description": "In Process moment creation result (nullable)"
  },
  "imageUrl": {
   "type": "string",
   "description": "Fetchable URL for the uploaded image (nullable)"
  },
  "arweaveError": {
   "type": "string",
   "description": "Error message if Arweave upload failed (optional)"
  },
  "arweaveResult": {
   "type": "object",
   "description": "Arweave transaction result (nullable)"
  }
 },
 "description": "GenerateImageResult containing the generated image and metadata"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/recoupable-ai-image-generator-5c2554f7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.recoupable.dev](https://www.zero.xyz/host/api.recoupable.dev/llms.txt)
