AI image generation, text to image (FLUX.1 schnell): photo, illustration, logo, 3D; style-faithful, safety-screened
ai_imageGenerate one 1024×1024 image from a short prompt (max 600 chars) with FLUX.1 [schnell] (Apache-2.0) on our Cloudflare Worker via Workers AI. Before generation we detect the medium you asked for (photo, illustration, flat vector, logo/icon, watercolor, oil painting, pencil sketch, ink, anime, comic, pixel art, 3D render, digital painting) and rewrite the prompt to honour it, with style-specific quality guidance (e.g. real lens and natural light for photos, clean 2D linework for illustrations); no medium named = natural photo. The medium is never switched and nothing unrequested is added; set style to force one, or enhance=false to use your prompt as written. Both your prompt and the final prompt go through our content screen (keyword rules + an LLM check): sexual content, minors, violence/weapons, real or identifiable people, hate and illegal content are refused with 400 and you are not charged. The image itself is not classified. Returns a base64 JPEG plus the final prompt and detected style. Capped at a small number of images per day: 503 (not charged) when used up. Price: $0.01 USDC on Base per call, paid with x402 (MCP transport: an unpaid call returns the x402 PaymentRequired object; retry with params._meta["x402/payment"]). Same tool over HTTP: POST /api/ai/image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | 1-8, default 6 | |
| style | No | optional override; default auto (detected from prompt, photo if none) | |
| prompt | Yes | what to make, max 600 chars | |
| enhance | No | default true; false = use the prompt as given |