# Recoupable AI Image Generation

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

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

## Facts

- Endpoint: GET https://api.recoupable.com/api/x402/image/generate
- Price: $0.15/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/recoupable-ai-image-generation-b2f85a74
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GMw6t_tNjWzPsnNbjh5no

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-generation-b2f85a74
```

Example prompt: Generate an image of a futuristic cityscape at sunset with neon lights reflecting off rain-soaked streets, cyberpunk style.

## When to prefer this

Choose this endpoint when you need to generate an AI image from a text prompt and receive it as a base64-encoded file, optionally with a fetchable URL and decentralized Arweave storage. It is ideal for agents operating in the x402 payment ecosystem and needing on-chain or permanent image storage alongside generation.

## Known failure modes

- Invalid or empty prompt returns an error response
- Payment not provided or insufficient results in a 402 Payment Required response
- Arweave upload failure returns an arweaveError string but still provides the base64 image
- Model timeout or overload may result in a server error
- Malformed request parameters may return a 400 Bad Request

## 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, an optional fetchable image URL, Arweave transaction details if uploaded, token usage statistics (input, output, reasoning, and total tokens), and any Arweave error messages if the upload failed.

## 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-generation-b2f85a74/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.recoupable.com](https://www.zero.xyz/host/api.recoupable.com/llms.txt)
