# Lotus Network API – Text-to-Image Generation (FLUX)

> Lotus Network API – Text-to-Image Generation (FLUX) is a paid API for AI agents from lotusnetworkapi.com, paid per call via x402, $0.08/call, status unknown (last checked 2026-09-15).

Generates a 1024x1024 image from a text prompt using FLUX, returning it as base64 JSON or raw bytes plus a durable direct URL, with no API key required.

## Facts

- Endpoint: GET https://lotusnetworkapi.com/api/v1/generate-image
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lotus-network-api-text-to-image-generation-flux-c6e6eb8e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I5vVjAAS5ZOd1SiEzl8ca

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 lotus-network-api-text-to-image-generation-flux-c6e6eb8e
```

Example prompt: Generate an image of a serene Japanese zen garden at sunset with cherry blossoms falling, and give me back the image URL and base64 data in JSON format.

## When to prefer this

Choose this endpoint when you need a quick, no-registration text-to-image generation with FLUX quality and want a durable hosted URL in addition to raw image data. It is ideal for agents that need to generate images on demand without managing API credentials, and when a per-call micropayment model (USDC via x402) is acceptable. Prefer alternatives if you need style controls, aspect ratio customization beyond 1024x1024, or higher-volume batch generation at lower per-image cost.

## Known failure modes

- Empty or missing prompt parameter returns an error response
- Invalid format enum value (anything other than 'json' or 'binary') may cause a bad request error
- Payment failure or insufficient USDC balance prevents the call from completing (x402 payment required)
- FLUX model timeout or overload may result in a slow or failed generation
- Retained image URL may expire after the stated retention period

## How this service works

Text-to-image generation powered by FLUX.2 [pro]. Send a prompt, get back a 1024x1024 image as base64 JSON or raw bytes, plus a durable direct URL. No API key or account needed.

## Output

A JSON object containing: success flag, the original prompt, model name used (FLUX), base64-encoded image string, MIME type, an absolute durable URL to the image, a download URL, and the number of days the image will be retained. Alternatively, raw binary image bytes if the binary format is requested.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "format": {
       "enum": [
        "json",
        "binary"
       ],
       "type": "string"
      },
      "prompt": {
       "type": "string",
       "description": "Text description of the image to generate"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "image": {
       "type": "string",
       "description": "Base64-encoded image"
      },
      "model": {
       "type": "string"
      },
      "prompt": {
       "type": "string"
      },
      "success": {
       "type": "boolean"
      },
      "mimeType": {
       "type": "string"
      },
      "absoluteUrl": {
       "type": "string"
      },
      "downloadUrl": {
       "type": "string"
      },
      "retentionDays": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "image": "<base64-encoded image bytes>",
  "model": "black-forest-labs/flux-2-pro",
  "prompt": "a cyberpunk city skyline at dusk, neon reflections",
  "success": true,
  "mimeType": "image/webp",
  "absoluteUrl": "https://lotusnetworkapi.com/api/v1/image/9f2c4a1e7b3d5f8091a2b3c4d5e6f708"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lotus-network-api-text-to-image-generation-flux-c6e6eb8e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lotusnetworkapi.com](https://www.zero.xyz/host/lotusnetworkapi.com/llms.txt)
