If you're looking for an API, you can choose from your desired programming language.
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
41
42
43
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')
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/ai-product-photography"
# Request payload
data = {
"prompt": "A modern living room with a vibrant orange mid-century modern sofa as the centerpiece, featuring clean lines, soft cushions, and fabric upholstery in a bold sunflower-orange hue, sitting on light wooden legs. The sofa is placed on a neutral beige area rug, surrounded by Scandinavian-style furniture, including a small white coffee table with a green potted plant. The background showcases white walls with abstract artwork and a large window letting in natural light. Subtle shadows and warm, diffused sunlight illuminate the room, highlighting the textures of the fabric and wood. Created using: Canon EOS 5D, soft-focus lens, mid-century modern aesthetic, Scandinavian design, HDR, high-contrast light, ultra-sharp detailing, natural materials",
"lighting_prompt": "natural day lighting, shadows",
"negative_prompt": "CGI, Unreal, Airbrushed, Digital, Blur",
"image": image_url_to_base64("https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/ppv5-ip-v2.jpg"), # Or use image_file_to_base64("IMAGE_PATH")
"megapixel": 1,
"aspect_ratio": "8:5 (Cinematic View)",
"x_value": 50,
"y_value": 65,
"scale": 0.7,
"steps": 10,
"guidance_scale": 2,
"seed": 98522,
"detailer_mode": "soft_light",
"lighting": False,
"detailtransfer": False,
"image_format": "png",
"image_quality": 90
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
The main prompt for the image generation
Additional prompt for lighting and environment
Negative prompt to avoid unwanted elements
URL of the product image
Select the megapixel setting
Allowed values:
Aspect ratio for image generation
Allowed values:
X-axis coordinate value
min : 1,
max : 100
Y-axis coordinate value
min : 1,
max : 100
Scaling factor
min : 0,
max : 1
Number of inference steps
min : 1,
max : 20
Guidance scale for controlling how closely the generation matches the prompt
min : 1,
max : 20
Random seed for image generation (-1 for random)
Mode for detail restoration
Allowed values:
Enable lighting enhancements
Enable detail transfer from input to output
Output image format
Allowed values:
Image quality setting for output
min : 10,
max : 100
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.
Elevate your product imagery with our AI-powered photography model. Create stunning, professional-quality photos that boost engagement and sales. Perfect for e-commerce and digital marketing.
Intuitive Prompt Customization: Create unique, tailored inputs to guide the AI model in generating precisely the images you envision.
Utilize a range of lighting options to showcase your products in their best light, creating an authentic and inviting atmosphere for your product presentations.
Achieve crystal-clear product images which are sharp, detailed, and suitable for various digital platforms and print media.
Fine-tune your images with exact X and Y value adjustments and scale settings. This level of control allows you to achieve the perfect focus and framing for each product, highlighting its best features.
Optimal Aspect Ratio Selection: The model offers a range of aspect ratios for image outputs, each with its own unique characteristics and use cases
Detailer Mode Enhance the depth and nuance of your product images. This feature adds professional-looking enhancements that make your products more appealing and true-to-life.
Cost-Effective Solution: Reduce the need for expensive photography equipment and studio setups.
Time-Saving: Generate multiple product images quickly, streamlining your content creation process.
Consistency: Maintain a uniform look across your product catalog with ease.
Customization: Easily adapt images for different seasons, promotions, or target markets.
Scalability: Create high-quality images for large product catalogs without compromising on quality.
SDXL ControlNet gives unprecedented control over text-to-image generation. SDXL ControlNet models Introduces the concept of conditioning inputs, which provide additional information to guide the image generation process
Fooocus enables high-quality image generation effortlessly, combining the best of Stable Diffusion and Midjourney.
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training
This model is capable of generating photo-realistic images given any text input, with the extra capability of inpainting the pictures by using a mask