Flux Depth Pro

Professional depth-aware image generation. Edit images while preserving spatial relationships.


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 import requests api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/flux-depth-pro" # Prepare data and files data = {} files = {} data['seed'] = 96522 data['steps'] = 40 data['prompt'] = "American man, smiling, waving, eyeglasses, casual clothing, sitting at desk, laptop, home office, indoor, daylight, modern decor, house plants, bookshelf, natural lighting" data['guidance'] = 7 # For parameter "control_image", you can send a raw file or a URI: # files['control_image'] = open('IMAGE_PATH', 'rb') # To send a file # data['control_image'] = 'IMAGE_URI' # To send a URI 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


seedint ( default: 96522 )

Random seed. Set for reproducible generation


stepsint ( default: 40 )

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

min : 15,

max : 50


promptstr *

Text prompt for image generation


guidancefloat ( default: 7 )

Controls the balance between adherence to the text as well as image 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 : 1,

max : 50


control_imagestr *

Image to use as control input. Must be jpeg, png, or webp.


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 Depth Pro

Flux Depth Pro is an advanced AI model developed by Black Forest Labs, designed to enhance image generation by integrating depth information. This model leverages depth maps to provide a three-dimensional perspective, resulting in images with improved realism and spatial accuracy.

Key Features of Flux Depth Pro

  • Depth Map Integration: Utilizes depth maps to inform the generation process, ensuring that images accurately represent spatial relationships and depth cues.

  • Enhanced Realism: By incorporating depth information, the model produces images with a more lifelike appearance, capturing the nuances of light and shadow.

  • Versatile Application: Suitable for various creative projects, including digital art, virtual reality content, and architectural visualization, where depth perception is crucial.

Benefits of Using Flux Depth Pro

  • Improved Visual Quality: The integration of depth maps leads to images with better-defined spatial relationships, enhancing the overall visual quality.

  • Consistency in Output: Ensures that generated images consistently exhibit accurate depth cues, maintaining a high standard across different projects.

  • Efficiency in Workflow: Streamlines the image generation process by automatically incorporating depth information, reducing the need for manual adjustments.

Applications of Flux Depth Pro

  • Digital Art Creation: Assists artists in producing detailed and realistic images, enhancing the artistic quality of digital artworks.

  • Virtual Reality Content: Enables the creation of immersive VR experiences by generating images with accurate depth perception.

  • Architectural Visualization: Facilitates the creation of realistic architectural renderings, accurately representing spatial relationships and depth.

By incorporating depth information, Flux Depth Pro offers a powerful tool for professionals seeking to generate images with enhanced realism and spatial accuracy.