{"info":{"title":"black-forest-labs/flux-kontext/dev","version":"1.0.0"},"paths":{"/":{"post":{"summary":"Edit Image","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}}},"description":"Successful Response"}},"operationId":"flux_kontext_dev_edit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}},"required":true}}}},"openapi":"3.1.0","components":{"schemas":{"Input":{"type":"object","title":"Input","required":["prompt","image_url"],"properties":{"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","x-order":7,"description":"Random seed. The same seed, prompt, and image produce the same result."},"prompt":{"type":"string","title":"Prompt","x-order":0,"description":"The edit instruction. Describe the change to apply to the source image (e.g. 'change the wooden floor to white marble') and name anything that should stay the same."},"image_url":{"type":"string","title":"Image URL","format":"uri","x-order":1,"description":"The source image to edit. Unmentioned regions are kept consistent while the described change is applied."},"num_images":{"type":"integer","title":"Num Images","default":1,"maximum":4,"minimum":1,"x-order":9,"description":"The number of images to generate. Each generated image is billed."},"acceleration":{"allOf":[{"$ref":"#/components/schemas/AccelerationEnum"}],"title":"Acceleration","default":"none","x-order":6,"description":"Inference acceleration level. 'none' is highest quality; 'regular' and 'high' are progressively faster with a small quality trade-off. Does not change the price."},"output_format":{"allOf":[{"$ref":"#/components/schemas/OutputFormatEnum"}],"title":"Output Format","default":"jpeg","x-order":5,"description":"The format of the generated image."},"guidance_scale":{"type":"number","title":"Guidance Scale","default":2.5,"maximum":20,"minimum":1,"x-order":3,"description":"How strongly the result follows the edit instruction. Raise for stronger adherence; lower if the edit looks over-applied."},"resolution_mode":{"allOf":[{"$ref":"#/components/schemas/ResolutionModeEnum"}],"title":"Resolution Mode","default":"match_input","x-order":4,"description":"Output resolution. 'match_input' keeps the source image's resolution (recommended for alignment); 'auto' lets the model pick an optimal resolution matching the input aspect; or force an aspect ratio such as '16:9', '4:3', or '9:16'."},"num_inference_steps":{"type":"integer","title":"Num Inference Steps","default":28,"maximum":50,"minimum":10,"x-order":2,"description":"Number of denoising steps. More steps can improve detail at the cost of speed."},"enable_safety_checker":{"type":"boolean","title":"Enable Safety Checker","default":true,"x-order":8,"description":"If set to true, the safety checker will be enabled."}},"x-fal-order-properties":["prompt","image_url","num_inference_steps","guidance_scale","resolution_mode","output_format","acceleration","seed","enable_safety_checker","num_images"]},"Output":{"type":"array","items":{"type":"string","format":"uri"},"title":"Output","description":"The edited image files."},"AccelerationEnum":{"enum":["none","regular","high"],"type":"string","title":"AccelerationEnum","description":"The inference acceleration level."},"OutputFormatEnum":{"enum":["jpeg","png"],"type":"string","title":"OutputFormatEnum","description":"The format of the generated image."},"ResolutionModeEnum":{"enum":["auto","match_input","1:1","16:9","21:9","3:2","2:3","4:5","5:4","3:4","4:3","9:16","9:21"],"type":"string","title":"ResolutionModeEnum","description":"The output resolution mode."}}}}