{"uid":"cap_UJvqtxiziIIKBaE1EMMEg","slug":"stablestudio-generate-bb6292aa","name":"StableStudio Flux 2 Pro Image Generation","description":"Pay-per-generation AI image and video creation. No subscriptions ever.","url":"https://stablestudio.dev/api/generate/flux-2-pro/generate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Random seed for reproducibility"},"prompt":{"type":"string","maxLength":10000,"minLength":1,"description":"A detailed description of the image you want to generate"},"resolution":{"enum":["0.5 MP","1 MP","2 MP"],"type":"string","default":"1 MP","description":"Output resolution in megapixels"},"aspect_ratio":{"enum":["1:1","16:9","9:16","3:2","2:3","4:5","5:4","4:3","3:4"],"type":"string","default":"1:1","description":"Aspect ratio of the output image"},"output_format":{"enum":["webp","jpg","png"],"type":"string","default":"webp","description":"Output image format"},"output_quality":{"type":"integer","default":80,"maximum":100,"minimum":0,"description":"Quality for JPG/WebP output (0-100)"},"safety_tolerance":{"type":"integer","default":2,"maximum":5,"minimum":1,"description":"Content safety strictness (1=strict, 5=permissive)"},"prompt_upsampling":{"type":"boolean","default":false,"description":"Let the model enhance your prompt for more creative results"}}},"responseSchema":{"type":"json","example":{"type":"flux-2-pro-generate","jobId":"cmpbmzaee000j04jrzx4f43tw","status":"pending","pollUrl":"https://stablestudio.dev/api/jobs/cmpbmzaee000j04jrzx4f43tw","success":true}},"example":{"request":{"seed":42,"prompt":"A serene landscape with rolling green hills, a clear blue sky, and wildflowers in the foreground during golden hour","resolution":"1 MP","aspect_ratio":"16:9","output_format":"webp","output_quality":80,"safety_tolerance":2,"prompt_upsampling":false},"response":{"type":"flux-2-pro-generate","jobId":"cmpqdod6a000104l7s8mz7cg2","status":"pending","success":true}},"exampleRequest":{"seed":42,"prompt":"A serene landscape with rolling green hills, a clear blue sky, and wildflowers in the foreground during golden hour","resolution":"1 MP","aspect_ratio":"16:9","output_format":"webp","output_quality":80,"safety_tolerance":2,"prompt_upsampling":false},"tags":["image","video","generation","nano-banana","gpt-image","grok","flux","sora","veo","seedance","wan","ai","media","x402"],"displayCostAmount":"10","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":"$10/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"10","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"10","per":"call","confidence":"exact"},{"kind":"static","protocol":"x402","network":"base","amountUsd":"10","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xOWjr3tYWmub1x0E_yXvq","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"10","costPer":"request","priority":0,"asset":"0x20c000000000000000000000b9537d11c60e8b50","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_E_uNCbTMSBwpYGpVZuzwp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"10","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"StableStudio","brandSlug":"stablestudio","brandBaseUrl":"https://stablestudio.dev","brandDocsUrl":"https://stablestudio.dev","whatItDoes":"Generates high-quality images from text prompts using the Flux 2 Pro model, returning a job ID for async retrieval","exampleAgentPrompt":"Generate an image of a misty Japanese mountain village at dawn with cherry blossoms falling, 16:9 aspect ratio, 2 MP resolution, in PNG format — use Flux 2 Pro and enhance the prompt for more creative results.","exampleUseCases":null,"resultDescription":"Returns a JSON object with a jobId string, a status of 'pending', a type field, and a success boolean (true). The agent must poll a separate job-status endpoint using the jobId to retrieve the final generated image URL once processing completes.","failureModes":["Invalid or empty prompt returns a 400 validation error","Prompt exceeds 10,000 character limit causing a 422 error","Unsupported aspect_ratio or resolution enum value returns 400","Payment of $10 USDC not provided or rejected causes a 402 error","Safety tolerance mismatch with prompt content may cause generation refusal","Server overload or model unavailability returns 503","Invalid seed value outside integer bounds returns 400"],"whenToPreferThis":"Choose this endpoint when you need state-of-the-art image quality from the Flux 2 Pro model specifically, and are comfortable with an async job-based workflow. Prefer this over GPT Image or Grok image endpoints when Flux's photorealistic style is desired, or when you need fine-grained control over resolution (up to 2 MP), aspect ratio, seed reproducibility, and output format. Best for production-quality image generation tasks where image fidelity matters more than speed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:37:21.243Z","isFirstParty":false,"canonicalSlug":"stablestudio-generate-bb6292aa"}