# Recoup AI Image Generation

> Recoup AI Image Generation is a paid API for AI agents from recoup-api.vercel.app, paid per call via x402, $0.15/call, status unknown (last checked 2026-09-15).

Generates an AI image from a text prompt and returns it as a base64-encoded string

## Facts

- Endpoint: POST https://recoup-api.vercel.app/api/x402/image/generate
- Price: $0.15/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/recoup-api-vercel-app-486eec18
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nzrzuvWtWNR8jH02X3oNj

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 recoup-api-vercel-app-486eec18 -d '<json body>'
```

Example prompt: Generate an AI image of a serene mountain landscape with snow-capped peaks and a clear blue sky — give me the result as a base64 image.

## When to prefer this

Use this endpoint when you need to generate a novel image from a text description and want the result returned as a base64-encoded image payload, particularly in x402 micropayment-enabled agentic workflows on Base network. Best suited for single-image, on-demand generation at low cost ($0.15 USDC per call).

## Known failure modes

- Missing X-PAYMENT header returns 402 with payment requirements and accepted assets
- Invalid or malformed prompt may produce unexpected or low-quality images
- Payment asset or network mismatch causes payment rejection
- Prompt too long or containing disallowed content may be rejected
- Service unavailable or timeout on the Vercel deployment

## How this service works

Generate an image from a text prompt using AI

## Output

Returns a JSON object containing an image field with a base64-encoded string of the generated image and its media type, ready for display or further processing.

## 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/recoup-api-vercel-app-486eec18/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from recoup-api.vercel.app](https://www.zero.xyz/host/recoup-api.vercel.app/llms.txt)
