{"uid":"cap_a4FTTANxpH63KJkxgp9t1","slug":"agent402-tools-fast-image-generation-a04f2bce","name":"Agent402.Tools Fast Image Generation","description":"Generate an image from a text prompt at a flat price per picture, no token math and no subscription: the OpenAI images request shape in, base64 PNG or JPEG out, with an automatic fallback model so a provider outage does not become your error. Use it when an agent needs a picture cheaply and predictably.","url":"https://agent402.tools/v1/images/fast","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text description of the image to generate (up to 4,000 chars)"}}},"responseSchema":{"type":"json","example":{"data":[{"b64_json":"/9j/4AAQSkZJRgABAQAAAQABAAD…","media_type":"image/jpeg"}],"model":"black-forest-labs/flux.2-klein-4b","usage":{"total_tokens":4107,"prompt_tokens":11,"completion_tokens":4096},"created":1750000000}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GHKuRfNzKcqlvjT8bzkh2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a JPEG image from a text prompt using the FLUX.2 Klein 4B model, returning base64-encoded image data","exampleAgentPrompt":"Generate an image of a sun-drenched Tuscan vineyard at golden hour, with rolling hills in the background, rustic stone farmhouse, and rows of grapevines casting long shadows.","exampleUseCases":[{"title":"Product mockup from description","prompt":"Create an image of a sleek, matte black insulated water bottle on a minimalist white background with soft studio lighting — I need it for a product listing."},{"title":"Blog post hero image generation","prompt":"Generate an image of a cozy home office setup with warm lighting, a wooden desk, open laptop, a steaming coffee mug, and plants on the windowsill — for the header of my productivity blog post."},{"title":"Concept art for game environment","prompt":"Create a dramatic fantasy landscape image showing a crumbling ancient castle on a cliff above a stormy ocean at twilight, with lightning in the dark purple sky — I'm using it as concept art for a game level."}],"resultDescription":"A JSON object containing a `data` array with one entry holding a `b64_json` field (base64-encoded JPEG image) and `media_type` of `image/jpeg`, along with the model name (`black-forest-labs/flux.2-klein-4b`), creation timestamp, and token usage stats (total, prompt, and completion tokens).","failureModes":["Prompt exceeds 4,000 characters — request rejected or truncated","Payment failure — insufficient USDC balance or x402 wallet not configured","Model unavailability — upstream FLUX model service outage","Malformed request body — missing or non-string `prompt` field","Content policy violation — prompt contains disallowed content and is rejected"],"whenToPreferThis":"Choose this endpoint when you need fast, pay-per-call image generation with no API key signup, paying per image with USDC via x402. It is especially suitable for AI agents that already operate in the x402 payment ecosystem and need FLUX-quality imagery on demand. Prefer it over OpenAI DALL-E or Stability AI endpoints when you want a wallet-based identity model and FLUX.2 Klein aesthetics specifically.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T20:29:09.354Z","isFirstParty":false}