{"uid":"cap_7yynqaaB5ZarKNIJaS4pt","slug":"nojunk-image-text-to-image-generation-flux-1-schnell-adf92ee6","name":"NoJunk Image – Text-to-Image Generation (FLUX.1 schnell)","description":"NoJunk Image generate: Generate an image from a text prompt with FLUX.1 schnell; returns PNG bytes (default) or base64 JSON.","url":"https://nojunk-image.mick8511.workers.dev/generate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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)"}}},"responseSchema":{"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}},"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_ADU7G2PS7rrHonAWjD8Ig","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 PNG image from a text prompt using FLUX.1 schnell, returning raw PNG bytes or a base64-encoded JSON response.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Product mockup image generation","prompt":"Create an image of a sleek white ceramic coffee mug on a wooden table with soft morning light — use 8 diffusion steps and give me the result as base64 JSON so I can drop it into our product listing."},{"title":"Blog post illustration creation","prompt":"Generate an illustration of a futuristic city skyline at night with neon lights and flying cars, 4 steps is fine, and return the raw PNG bytes."},{"title":"Concept art for game asset","prompt":"Make an image of a dark fantasy dungeon entrance with glowing green runes carved into stone walls — seed it with 1234 so I can reproduce the same image later, and use 6 diffusion steps."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T20:16:25.850Z","isFirstParty":false,"canonicalSlug":"nojunk-image-text-to-image-generation-flux-1-schnell-adf92ee6"}