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.

~11.58s
~$0.064
 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

POSThttps://api.segmind.com/v1/ai-product-photography

Parameters

imagerequired
string (uri)

URL of the product image

Default: "https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/ppv5-ip-v2.jpg"
promptrequired
string

The main prompt for the image generation

Default: "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_ratiooptional
string

Aspect ratio for image generation

Default: "8:5 (Cinematic View)"
Allowed values (23 total):
"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 more
detailer_modeoptional
string

Mode for detail restoration

Default: "soft_light"
Allowed values (11 total):
"add""multiply""screen""overlay""soft_light""hard_light""color_dodge""color_burn""difference""exclusion"+1 more
detailtransferoptional
boolean

Enable detail transfer from input to output

Default: true
guidance_scaleoptional
integer

Guidance scale for controlling how closely the generation matches the prompt

Default: 2Range: 1 - 20
image_formatoptional
string

Output image format

Default: "png"
Allowed values :
"jpeg""png""webp"
image_qualityoptional
integer

Image quality setting for output

Default: 90Range: 10 - 100
lightingoptional
boolean

Enable lighting enhancements

Default: true
lighting_promptoptional
string

Additional prompt for lighting and environment

Default: "natural day lighting, shadows"
megapixeloptional
number

Select the megapixel setting

Default: 1
Allowed values :
0.10.5
1.01
1.5
2.02
2.12.22.32.42.5
negative_promptoptional
string

Negative prompt to avoid unwanted elements

Default: "CGI, Unreal, Airbrushed, Digital, Blur"
scaleoptional
number

Scaling factor

Default: 0.63Range: 0 - 1
seedoptional
integer

Random seed for image generation (-1 for random)

Default: -1
stepsoptional
integer

Number of inference steps

Default: 8Range: 1 - 20
x_valueoptional
number

X-axis coordinate value

Default: 50Range: 1 - 100
y_valueoptional
number

Y-axis coordinate value

Default: 65Range: 1 - 100

Response Type

Returns: Image

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out