{"uid":"cap_e1Iw2v9QhWupJL-8WW49d","slug":"ai-image-generator-cloudflare-workers-ai-flux-1-494f77cf","name":"AI Image Generator (Cloudflare Workers AI / FLUX.1)","description":"Generate an AI_POLICY.md and a pull request template with an AI-disclosure section for your open-source repo. Free, runs in your browser.","url":"https://ai-policy-kit.moneymaker-ai.workers.dev/api/ai/image?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":{"steps":{"type":"string","description":"1-8, default 6"},"style":{"enum":["auto","photo","illustration","flat_vector","logo_icon","watercolor","oil_painting","pencil_sketch","ink_drawing","anime","comic","pixel_art","3d_render","digital_painting"],"type":"string","description":"optional override; default auto (detected from prompt, photo if none)"},"prompt":{"type":"string","description":"what to make, max 600 chars"},"enhance":{"enum":["true","false"],"type":"string","description":"default true; false = use the prompt as given"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"mime":"image/jpeg","note":"AI-generated image. Prompts are screened before generation; the image itself is not classified, so review it before publishing. You are responsible for how you use it.","steps":6,"style":"pencil_sketch","width":1024,"engine":"@cf/black-forest-labs/flux-1-schnell on Cloudflare Workers AI (FLUX.1 [schnell], Apache-2.0)","height":1024,"safety":{"keyword_screen":"passed","output_checked":false,"llm_screen_final":"passed","llm_screen_original":"passed"},"enhanced":true,"enhancement":"@cf/ibm-granite/granite-4.0-h-micro rewrite + rules","bytes_approx":398091,"final_prompt":"A graphite pencil sketch of an old bicycle leaning on a wall. Monochrome hand-drawn graphite on off-white sketchbook paper, confident pencil lines, cross-hatching and soft smudged shading for form, visible pencil strokes and paper texture, light construction lines, flat two-dimensional drawing.","image_base64":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEB…(truncated)","style_source":"rules","original_prompt":"can you make me a pencil sketch of an old bicycle leaning on a wall"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UusT-FmKSLpM8nj8RvRRx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a 1024×1024 AI image from a text prompt using FLUX.1 [schnell] via Cloudflare Workers AI, with optional style selection and prompt enhancement.","exampleAgentPrompt":"Can you generate a pencil sketch of an old bicycle leaning against a brick wall — use the pencil_sketch style and let it enhance the prompt automatically?","exampleUseCases":[{"title":"Product mockup illustration for a landing page","prompt":"Generate a flat vector illustration of a sleek pair of wireless headphones on a white background — use the flat_vector style and enhance the prompt."},{"title":"Fantasy character artwork for a game","prompt":"Create an anime-style image of a female warrior in silver armor standing in a misty forest at dawn, 8 steps, enhance enabled."},{"title":"Social media logo icon for a startup","prompt":"Make a logo icon of a minimalist rocket launching into a starry night sky — logo_icon style, max quality steps of 8, with prompt enhancement on."}],"resultDescription":"A JSON object containing the generated image as a base64-encoded JPEG string (~400KB typical), along with the image dimensions (1024×1024), the style applied, number of diffusion steps used, the final enhanced prompt, the AI engine name, approximate byte size, and a safety screening report indicating whether keyword and LLM screens passed.","failureModes":["Prompt fails keyword safety screen — returns error before generation begins","Prompt is too long (over 600 characters) — validation error","Invalid style enum value — rejected by schema validation","steps parameter out of range (must be 1–8) — validation error","Cloudflare Workers AI upstream timeout — may return 500 or empty response","Payment of 0.01 USDC not fulfilled via x402 — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need a quick, low-cost ($0.01) text-to-image generation with automatic style detection and prompt enhancement, especially if you want named artistic styles like pencil_sketch, anime, watercolor, or flat_vector. It runs on Cloudflare's edge via FLUX.1 [schnell] (Apache-2.0), making it fast and serverless. Prefer alternatives if you need very high photorealism, video, audio, or multi-image batch generation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T06:40:06.224Z","isFirstParty":false,"canonicalSlug":"ai-image-generator-cloudflare-workers-ai-flux-1-494f77cf"}