Segmind Relighting V2

Transform images with customizable, photorealistic lighting for unparalleled visual creativity and authenticity.


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 28 29 30 31 32 33 34 35 36 37 38 39 40 import requests import base64 # Use this function to convert an image file from the filesystem to base64 def image_file_to_base64(image_path): with open(image_path, 'rb') as f: image_data = f.read() return base64.b64encode(image_data).decode('utf-8') # Use this function to fetch an image from a URL and convert it to base64 def image_url_to_base64(image_url): response = requests.get(image_url) image_data = response.content return base64.b64encode(image_data).decode('utf-8') # Use this function to convert a list of image URLs to base64 def image_urls_to_base64(image_urls): return [image_url_to_base64(url) for url in image_urls] api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/segmind-relighting-v2" # Request payload data = { "image": "https://segmind-resources.s3.amazonaws.com/output/b9b4e651-ecfb-4dd8-a121-6663f63cca8e-5e23ecbb-6875-4296-9b05-481c03eac5bf.png", "light_direction": "back", "light_type": "spotlight", "light_temperature": "warm", "light_intensity": "strong", "size": "auto", "quality": "high", "background": "opaque", "output_compression": 100, "output_format": "png" } headers = {'x-api-key': api_key} response = requests.post(url, json=data, 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


imagestr *

Provide the URL of the image to be relit. Use a URL from cloud storage like S3.


light_directionenum:str *

Set the direction of lighting. For dramatic effects, choose 'back' or 'left'.

Allowed values:


light_typeenum:str *

Select the lighting source for desired mood. 'Spotlight' creates a focused beam effect.

Allowed values:


light_temperatureenum:str *

Choose light color to affect mood. 'Warm' is cozy while 'cool' suits tech themes.

Allowed values:


light_intensityenum:str *

Adjust light brightness. Choose 'strong' for well-lit images and 'mood' for softer settings.

Allowed values:


sizeenum:str ( default: auto ) Affects Pricing

Determine output resolution. 'Auto' allows the model to decide optimal resolution.

Allowed values:


qualityenum:str ( default: high ) Affects Pricing

Set visual quality of the output image. 'High' suits professional needs.

Allowed values:


backgroundenum:str ( default: opaque )

Select if the image background should be transparent or not; 'opaque' for regular use.

Allowed values:


output_compressionint ( default: 100 )

Adjust compression level. Lower numbers mean smaller file size but risk quality loss.


output_formatenum:str ( default: png )

Decide the format for the output image; 'webp' for balanced quality and size.

Allowed values:


use_case_configundefined ( default: 1 )

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.

Utilizing Segmind Relighting V2 for Enhanced Image Illumination

Segmind Relighting V2 is a cutting-edge AI model developed to transform image lighting with photorealistic finesse. Built upon the robust IC-Light architecture, it offers users the ability to fine-tune lighting conditions using simple text prompts, providing unparalleled creative flexibility for developers, creators, and executives alike.

Key Features and Integration Benefits

Text-Conditioned Relighting

With Segmind Relighting V2, users can intuitively specify the direction, type, color, and intensity of lighting through natural language prompts. This functionality simplifies the creative process, allowing creators to experiment with lighting scenarios without extensive manual adjustments. For developers, the inclusion of text-conditioned input facilitates seamless integration into existing digital workflows.

Photorealistic and Seamless Output

Maintaining the integrity of details, texture, and tonal balance, Segmind Relighting V2 excels in producing images where the lighting appears natural and cohesive. This feature is particularly beneficial for industries such as digital art and product visualization where visual authenticity is paramount.

Extensive Model Integration

The model's interoperability with tools like SDXL ControlNet and CodeFormer paves the way for comprehensive creative pipelines. Whether it’s enhancing photographs, prototyping film scenes, or animating sequences, Segmind Relighting V2 can adapt to a variety of tasks and improve production efficiency.

Practical Application and Tips

To maximize the model's potential, specificity in text prompts is crucial. Gradual changes allow for fine-tuning and avoid potential artifacts. For large-scale projects, such as product catalogs or digital art collections, batch processing can ensure consistent relighting across multiple images.

Segmind Relighting V2 stands as a powerful tool, delivering ease of use, seamlessly integrated lighting changes, and adaptability, thus empowering your projects with remarkable visual enhancements tailored to specific creative and business needs.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.