Flux Fill Pro

Professional inpainting and outpainting model with state-of-the-art performance. Edit or extend images with natural, seamless results.


API

If you're looking for an API, you can choose from your desired programming language.

POST
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 import requests api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/flux-fill-pro" # Prepare data and files data = {} files = {} # For parameter "mask", you can send a raw file or a URI: # files['mask'] = open('IMAGE_PATH', 'rb') # To send a file # data['mask'] = 'IMAGE_URI' # To send a URI data['seed'] = 965222 # For parameter "image", you can send a raw file or a URI: # files['image'] = open('IMAGE_PATH', 'rb') # To send a file # data['image'] = 'IMAGE_URI' # To send a URI data['steps'] = 50 data['prompt'] = "flower pot on the table" data['guidance'] = 3 data['output_format'] = "jpg" data['safety_tolerance'] = 2 data['prompt_upsampling'] = False headers = {'x-api-key': api_key} response = requests.post(url, data=data, files=files, headers=headers) print(response.content) # The response is the generated image
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


maskstr *

A black-and-white image that describes the part of the image to inpaint. Black areas will be preserved while white areas will be inpainted. Must have the same size as image. Optional if you provide an alpha mask in the original image. Must be jpeg, png, or webp.


seedint ( default: 965222 )

Random seed. Set for reproducible generation


imagestr *

The image to inpaint. Can contain an alpha mask. Must be jpeg, png, or webp.


stepsint ( default: 50 )

Number of diffusion steps. Higher values yield finer details but increase processing time.

min : 1,

max : 50


promptstr *

Text prompt for image generation


guidancefloat ( default: 3 )

Controls the balance between adherence to the text prompt and image quality/diversity. Higher values make the output more closely match the prompt but may reduce overall image quality. Lower values allow for more creative freedom but might produce results less relevant to the prompt.

min : 2,

max : 5


output_formatenum:str ( default: jpg )

Format of the output images.

Allowed values:


safety_toleranceint ( default: 2 )

Safety tolerance, 1 is most strict and 6 is most permissive

min : 1,

max : 6


prompt_upsamplingbool ( default: 1 )

Automatically modify the prompt for more creative generation

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Flux Fill Pro

Flux Fill Pro is an advanced state-of-the-art AI model developed by Black Forest Labs, specializing in professional inpainting and outpainting tasks. This model enables users to edit or extend images seamlessly, producing natural and cohesive results.

Key Features of Flux Fill Pro

  • Professional Inpainting and Outpainting: Allows for the removal or replacement of objects and the extension of images beyond their original borders, ensuring edits blend naturally with the existing content.

  • State-of-the-Art Performance: Delivers high-quality results by understanding complex scenes and maintaining consistency across edits, preserving lighting, perspective, and context.

  • Versatile Application: Suitable for various creative projects, including image editing, content creation, and restoration, where seamless integration of new elements is essential.

Benefits of Using Flux Fill Pro

  • Natural and Seamless Edits: Ensures that modifications integrate smoothly with the original image, maintaining a cohesive appearance.

  • Consistency in Output: Maintains uniformity across different edits, preserving the original image's integrity.

  • Efficiency in Workflow: Streamlines the editing process by automating complex inpainting and outpainting tasks, reducing the need for manual adjustments.

Applications of Flux Fill Pro

  • Object Removal: Effortlessly eliminate unwanted elements from photos, such as power lines, people, or objects, while maintaining a natural look.

  • Image Restoration: Repair old or damaged photos by filling in missing or deteriorated areas with precision.

  • Content Creation: Add new elements or expand scenes within existing images based on a descriptive prompt.

  • Experimentation: Explore different inpainting and outpainting techniques and styles for unique creative outputs.

By incorporating advanced inpainting and outpainting capabilities, Flux Fill Pro offers a powerful tool for professionals seeking to edit or extend images with natural, seamless results.