AI Product Photography
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.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/ai-product-photography"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "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",
12 "lighting_prompt": "natural day lighting, shadows",
13 "negative_prompt": "CGI, Unreal, Airbrushed, Digital, Blur",
14 "image": "https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/ppv5-ip-v2.jpg",
15 "megapixel": "1.0",
16 "aspect_ratio": "8:5 (Cinematic View)",
17 "x_value": 50,
18 "y_value": 65,
19 "scale": 0.7,
20 "steps": 10,
21 "guidance_scale": 2,
22 "seed": 98522,
23 "detailer_mode": "soft_light",
24 "lighting": false,
25 "detailtransfer": false,
26 "image_format": "png",
27 "image_quality": 90
28}
29
30response = requests.post(url, headers=headers, json=data)
31
32if response.status_code == 200:
33 result = response.json()
34 print(json.dumps(result, indent=2))
35else:
36 print(f"Error: {response.status_code}")
37 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/ai-product-photography"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "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",
12 "lighting_prompt": "natural day lighting, shadows",
13 "negative_prompt": "CGI, Unreal, Airbrushed, Digital, Blur",
14 "image": "https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/ppv5-ip-v2.jpg",
15 "megapixel": "1.0",
16 "aspect_ratio": "8:5 (Cinematic View)",
17 "x_value": 50,
18 "y_value": 65,
19 "scale": 0.7,
20 "steps": 10,
21 "guidance_scale": 2,
22 "seed": 98522,
23 "detailer_mode": "soft_light",
24 "lighting": false,
25 "detailtransfer": false,
26 "image_format": "png",
27 "image_quality": 90
28}
29
30response = requests.post(url, headers=headers, json=data)
31
32if response.status_code == 200:
33 result = response.json()
34 print(json.dumps(result, indent=2))
35else:
36 print(f"Error: {response.status_code}")
37 print(response.text)API Endpoint
https://api.segmind.com/v1/ai-product-photographyParameters
imagerequiredstring (uri)URL of the product image
"https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/ppv5-ip-v2.jpg"promptrequiredstringThe main prompt for the image generation
"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"aspect_ratiooptionalstringAspect ratio for image generation
"8:5 (Cinematic View)""1:1 (Perfect Square)""2:3 (Classic Portrait)""3:4 (Golden Ratio)""3:5 (Elegant Vertical)""4:5 (Artistic Frame)""5:7 (Balanced Portrait)""5:8 (Tall Portrait)""7:9 (Modern Portrait)""9:16 (Slim Vertical)""9:19 (Tall Slim)"+13 moredetailer_modeoptionalstringMode for detail restoration
"soft_light""add""multiply""screen""overlay""soft_light""hard_light""color_dodge""color_burn""difference""exclusion"+1 moredetailtransferoptionalbooleanEnable detail transfer from input to output
trueguidance_scaleoptionalintegerGuidance scale for controlling how closely the generation matches the prompt
2Range: 1 - 20image_formatoptionalstringOutput image format
"png""jpeg""png""webp"image_qualityoptionalintegerImage quality setting for output
90Range: 10 - 100lightingoptionalbooleanEnable lighting enhancements
truelighting_promptoptionalstringAdditional prompt for lighting and environment
"natural day lighting, shadows"megapixeloptionalnumberSelect the megapixel setting
10.10.511.522.12.22.32.42.5negative_promptoptionalstringNegative prompt to avoid unwanted elements
"CGI, Unreal, Airbrushed, Digital, Blur"scaleoptionalnumberScaling factor
0.63Range: 0 - 1seedoptionalintegerRandom seed for image generation (-1 for random)
-1stepsoptionalintegerNumber of inference steps
8Range: 1 - 20x_valueoptionalnumberX-axis coordinate value
50Range: 1 - 100y_valueoptionalnumberY-axis coordinate value
65Range: 1 - 100Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out