{"uid":"cap_y45JHd1L6OrMMAfCy_Oi4","slug":"x402-slinkylayer-ai-9ead51d0","name":"FLUX.2 Klein 4B Image Generation via Chat Completions","description":"Generate images from text prompts using FLUX.2 Klein 4B via chat completions.","url":"https://x402.slinkylayer.ai/api/v1/proxy/2cbf19e9-c878-45ae-a901-3dcada443fd3/chat-completions-flux-2-klein","method":"POST","headers":{},"bodySchema":{"type":"object","required":["model","messages","modalities"],"properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"modalities":{"type":"array","items":{"type":"string"}}}},"responseSchema":{"input":{"type":"http","method":"POST","bodyType":"json","bodyFields":{"model":{"type":"string","required":true},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}},"required":true},"modalities":{"type":"array","items":{"type":"string"},"required":true}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DhqUghK4zCt3fYgvzZ-yv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates images from text prompts using the FLUX.2 Klein 4B model via a chat completions-style API interface.","exampleAgentPrompt":"Generate an image of a serene mountain lake at sunset with golden reflections on the water and pine trees in the foreground — use the FLUX.2 Klein model with image modality.","exampleUseCases":[{"title":"Product mockup from description","prompt":"I need a product mockup image — generate a sleek wireless headphone floating on a clean white background with soft shadows and a modern aesthetic, like something you'd see in an Apple ad."},{"title":"Fantasy artwork for game assets","prompt":"Create a piece of fantasy artwork showing an ancient dragon perched on a crumbling castle tower at midnight, with glowing purple eyes and storm clouds swirling behind it — I want it detailed and cinematic."},{"title":"Social media post visual","prompt":"Generate a vibrant, eye-catching image of a tropical smoothie bowl topped with fresh mango, berries, and granola, shot from above on a rustic wooden table — something perfect for an Instagram food post."}],"resultDescription":"Returns a chat completion response object containing the generated image data (likely as a base64-encoded image or URL), produced by the FLUX.2 Klein 4B model based on the input text prompt.","failureModes":["Invalid or missing model field returns 400 error","Missing modalities array causes request failure","Empty or malformed messages array results in generation error","Payment failure or insufficient USDC balance blocks the request","Prompt too long or containing disallowed content returns rejection","Model overload or timeout may return 503 error"],"whenToPreferThis":"Choose this endpoint when you need text-to-image generation using the FLUX.2 Klein 4B model specifically, accessible via a chat completions-style interface. Prefer this over generic image APIs when you want FLUX-quality output with a familiar OpenAI-compatible message format and are willing to pay per-call in USDC via x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T16:47:53.252Z","isFirstParty":false}