{"info":{"title":"bria/background/replace","version":"1.0.0"},"paths":{"/":{"post":{"summary":"Background Replace","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}}},"description":"Successful Response"}},"operationId":"bria_background_replace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}},"required":true}}}},"openapi":"3.1.0","components":{"schemas":{"Input":{"type":"object","title":"Input","required":["image_url"],"properties":{"fast":{"type":"boolean","title":"Fast","default":true,"x-order":5,"description":"Trade some quality for faster generation. Turn off for maximum quality."},"seed":{"anyOf":[{"type":"integer","maximum":2147483647,"minimum":0},{"type":"null"}],"title":"Seed","x-order":6,"description":"Seed for reproducible generation. Leave unset for a random result."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Prompt","x-order":1,"description":"Describes the new background to generate behind the subject (e.g. 'a sunlit modern living room'). Provide either a non-empty prompt OR a ref_image_url reference image — not both."},"image_url":{"type":"string","title":"Image URL","format":"uri","x-order":0,"description":"The source photo whose foreground subject is preserved while a new background is generated around it. The output keeps the input's dimensions."},"num_images":{"type":"integer","title":"Num Images","default":1,"maximum":4,"minimum":1,"x-order":7,"description":"The number of images to generate. Each generated image is billed."},"ref_image_url":{"type":"string","title":"Reference Image URL","format":"uri","default":"","x-order":2,"description":"Optional reference image whose background style and colors the model matches instead of using a text prompt. Provide either ref_image_url OR a prompt — not both."},"refine_prompt":{"type":"boolean","title":"Refine Prompt","default":true,"x-order":4,"description":"Whether to automatically refine the background prompt for better results."},"negative_prompt":{"type":"string","title":"Negative Prompt","default":"","x-order":3,"description":"Describes what to avoid in the generated background."}},"x-fal-order-properties":["image_url","prompt","ref_image_url","negative_prompt","refine_prompt","fast","seed","num_images"]},"Output":{"type":"array","items":{"type":"string","format":"uri"},"title":"Output","description":"The generated image(s) with the original subject preserved and a new background."}}}}