# NoJunk Image – Text-to-Image Generation (FLUX.1 schnell)

> NoJunk Image – Text-to-Image Generation (FLUX.1 schnell) is a paid API for AI agents from nojunk-image.mick8511.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-19).

Generates a PNG image from a text prompt using FLUX.1 schnell, returning raw PNG bytes or a base64-encoded JSON response.

## Facts

- Endpoint: POST https://nojunk-image.mick8511.workers.dev/generate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nojunk-image-text-to-image-generation-flux-1-schnell-adf92ee6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7yynqaaB5ZarKNIJaS4pt

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 nojunk-image-text-to-image-generation-flux-1-schnell-adf92ee6 -d '<json body>'
```

Example prompt: Generate an image of a golden retriever puppy playing in autumn leaves in a park — use 6 diffusion steps and return it as base64 JSON so I can embed it in a webpage.

## When to prefer this

Choose this endpoint when you need fast, cheap ($0.01/call), pay-per-use text-to-image generation with no subscription required, especially in agentic workflows where you want to pay only on success. It is ideal for agents that need to generate images on demand without managing API keys or monthly quotas. Prefer it over hosted model APIs when operating in x402-compatible payment environments or when you need reproducible outputs via seed control.

## Known failure modes

- Prompt too short (<3 chars) or too long (>1500 chars) — validation error returned
- Invalid steps value outside 1-8 range — rejected with error
- Payment not authorized or insufficient USDC balance — 402 response before generation
- Model inference timeout or Cloudflare Workers AI backend error — 5xx response, no charge
- Invalid format value (not 'png' or 'json') — may return error or default behavior

## How this service works

NoJunk Image generate: Generate an image from a text prompt with FLUX.1 schnell; returns PNG bytes (default) or base64 JSON.

## Output

Returns either raw PNG image bytes (Content-Type: image/png) when format is 'png', or a JSON object containing the base64-encoded PNG string (image_base64), the prompt character count, seed used, number of diffusion steps, model name, byte size of the image, and generation timestamp. The response is only returned (and the $0.01 USDC charge applied) when a valid image is successfully generated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "steps": {
   "type": "integer",
   "description": "Optional: diffusion steps, 1-8 (default 4); more steps = more detail, slower"
  },
  "format": {
   "type": "string",
   "description": "Optional: \"png\" (default; response body is the raw PNG bytes) or \"json\" ({image_base64, ...})"
  },
  "prompt": {
   "type": "string",
   "description": "Text description of the image to generate (3 to 1500 characters)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "seed": 42,
  "bytes": 1216384,
  "model": "@cf/black-forest-labs/flux-1-schnell",
  "steps": 4,
  "content_type": "image/png",
  "generated_at": "2026-10-15T12:00:00.000Z",
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==",
  "prompt_chars": 103
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nojunk-image-text-to-image-generation-flux-1-schnell-adf92ee6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nojunk-image.mick8511.workers.dev](https://www.zero.xyz/host/nojunk-image.mick8511.workers.dev/llms.txt)
