Lifestyle Product Shot by Image

Transforms ordinary product images into stunning, marketing-ready visuals for eCommerce success.


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 41 42 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/bria-lifestyle-shot-by-image" # Request payload data = { "sku": "SKU12345", "image_url": "https://segmind-resources.s3.amazonaws.com/input/7f07de4f-35b2-4e48-939f-9496a1214b31-235b4b11-6dd1-4457-a780-e107cdff2df7.jpeg", "ref_image_urls": [ "https://segmind-resources.s3.amazonaws.com/input/923be7b5-9c0a-419b-835e-98de2806fb8e-For_Sofa.jpg" ], "enhance_ref_image": True, "ref_image_influence": 1, "placement_type": "original", "original_quality": False, "aspect_ratio": "16:9", "force_rmbg": False, "content_moderation": False } 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


skustr ( default: SKU12345 )

An optional identifier for the product. Use for inventory management or tracking specific items.


image_urlstr ( default: https://segmind-resources.s3.amazonaws.com/input/7f07de4f-35b2-4e48-939f-9496a1214b31-235b4b11-6dd1-4457-a780-e107cdff2df7.jpeg )

URL for the product image. Use a high-quality image URL for best results.


ref_image_urlsstr *

List of reference images. Use related visual contexts for accurate representation.


enhance_ref_imageboolean ( default: true )

Enhance image quality and realism. Enable for better visual results.


ref_image_influenceint ( default: 1 )

Degree of likeness to reference. Use 0 for minimal, 1 for strong resemblance.

min : 0,

max : 1


placement_typeenum:str ( default: original )

Controls product positioning and shot size. 'original' for exact placement, 'automatic' for versatile options.

Allowed values:


original_qualityboolean ( default: 1 )

Retain original size and quality. Enable for high-detail images.


aspect_ratioenum:str ( default: 16:9 )

Aspect ratio for output image. Choose from standard ratios for best fit.

Allowed values:


force_rmbgboolean ( default: 1 )

Enforce background removal for clearer images. Useful for image refinement.


content_moderationboolean ( default: 1 )

Enable moderation to ensure content appropriateness. Essential for compliance.

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.

Resources to get you started

Everything you need to know to get the most out of Lifestyle Product Shot by Image

# Guide to Using the Product Imaging Model Effectively

Leverage this model to generate polished, on-brand product visuals by fine-tuning a handful of parameters. Below are best practices and recommended settings for common use cases.

## 1. Core Tips
- Provide a clear, high-resolution `image_url` (ideally 1000×1000 px or larger).  
- Supply at least one `ref_image_urls` entry to ground style and context.  
- Enable `enhance_ref_image` when you need cleaner, more realistic details.  
- Toggle `content_moderation` on if you plan to publish on regulated platforms.

## 2. Parameter Descriptions
- **SKU**: Optional identifier for inventory tracking (e.g., `SKU12345`).  
- **ref_image_influence**: 0 = minimal resemblance, 1 = strong likeness.  
- **placement_type** (choices):  
  - `original`: Keep the product exactly as provided.  
  - `automatic`: Let the model choose optimal framing.  
  - `manual_placement` / `manual_padding` / `custom_coordinates`: For pixel-perfect control.  
  - `automatic_aspect_ratio`: Auto-crop while respecting aspect ratio.  
- **original_quality**: Preserve original resolution and detail.  
- **aspect_ratio**: Standard output shapes (e.g., `1:1`, `16:9`, `4:5`).  
- **force_rmbg**: Remove backgrounds automatically.  

## 3. Recommended Settings by Use Case

1. E-Commerce Catalog
   - ref_image_influence: 1  
   - placement_type: original  
   - original_quality: true  
   - aspect_ratio: 1:1  
   - force_rmbg: true  
   - content_moderation: false

2. Social Media Posts
   - ref_image_influence: 0.5  
   - placement_type: automatic  
   - original_quality: false  
   - aspect_ratio: 4:5 (Instagram) or 9:16 (Stories)  
   - enhance_ref_image: true  
   - force_rmbg: optional

3. Hero Banners & Ads
   - ref_image_influence: 0.8  
   - placement_type: automatic_aspect_ratio  
   - original_quality: false  
   - aspect_ratio: 16:9  
   - enhance_ref_image: true  
   - force_rmbg: true  
   - content_moderation: true

4. Print & High-Res Collateral
   - ref_image_influence: 1  
   - placement_type: custom_coordinates  
   - original_quality: true  
   - aspect_ratio: 3:2 or 4:3  
   - force_rmbg: false  
   - enhance_ref_image: false

## 4. Workflow Tips
1. Sketch or note desired framing before setting `placement_type`.  
2. Test `ref_image_influence` gradients (0.2, 0.5, 1) to dial in style fidelity.  
3. Use `force_rmbg` to speed up manual retouching.  
4. Always preview and iterate—minor tweaks to `aspect_ratio` or `padding` can yield big visual improvements.

By following these guidelines, you’ll streamline your image pipeline, maintain brand consistency, and produce stunning product visuals every time.

Other Popular Models

Discover other models you might be interested in.

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.