API
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
44
45
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-scenecraft-v01"
# Request payload
data = {
"image": image_url_to_base64("https://segmind-resources.s3.amazonaws.com/input/ea6c55f7-f97d-49e4-964f-09cfd27082f5-sofa_WSFABLZPN3FRAB_2.png"), # Or use image_file_to_base64("IMAGE_PATH")
"prompt": "Create a close-up and mid-range product shot of a modern living room sofa with a matte fabric texture and detailed stitching. The scene is set in a warm, cozy living space with soft ambient lighting coming from a side window filtered through sheer linen curtains. Accentuate the sofa’s contours with gentle, natural shadows and subtle reflections on nearby decor elements like a coffee table and floor lamp. Use a color palette dominated by earthy tones — warm beige, soft greys, and muted olive — to create a harmonious and inviting atmosphere. Include a minimalistic rug, wooden flooring, and a few aesthetic accessories like throw pillows and a blanket to enhance lifestyle appeal. Emphasize depth of field for a realistic photographic finish.",
"negative_prompt": "blur, CGI, animated",
"seed": -1,
"steps": 40,
"guidance_scale": 7,
"x_value": 50,
"y_value": 50,
"scale": 0.65,
"megapixel": 1.5,
"aspect_ratio": "16:9 (Panorama)",
"dropshadow": True,
"upscale": False,
"image_format": "jpeg",
"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
Attributes
Specifies the URL for the product image. Use high-quality images for best results.
Main directive for generating the image. Use specific requests for detailed images.
Specifies elements to avoid in the image. Useful for excluding undesired features.
Seed number for reproducibility in image generation. Use -1 for random variance.
Defines the granularity of image generation. More steps result in finer detail.
min : 1,
max : 50
Controls how closely the image matches the prompt. Higher values increase prompt adherence.
min : 1,
max : 20
X-axis coordinate for image positioning. Adjust for specific scene framing.
min : 1,
max : 100
Y-axis coordinate for image positioning. Use to modify vertical framing.
min : 1,
max : 100
Adjusts the size of the generated image. Fine-tune the scale for detail or abstraction.
min : 0,
max : 1
Sets the image resolution in megapixels. Use higher settings for crisp images.
Allowed values:
Determines the image's width-to-height ratio. Choose based on the desired output shape.
Allowed values:
Adds a shadow for depth perception. Ideal for enhancing image realism.
Increases the image resolution for sharper outputs. Recommended for print-quality images.
Selects the output file format. Use PNG for lossless quality.
Allowed values:
Determines the compression level; higher values retain more detail.
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.
Discovering Segmind SceneCraft v0.1: Elevate Product Photography with Generative AI
SceneCraft is a generative AI model by Segmind designed to transform isolated product images into visually compelling, photorealistic scenes. Whether you're working with a product on a plain white background or need to elevate existing shots, SceneCraft intelligently builds natural environments around the object. It understands spatial context, lighting dynamics, and stylistic cues to generate high-quality lifestyle or contextual visuals that look like they were captured by a professional photographer. This makes it ideal for e-commerce, social media ads, and catalog design, where visual appeal directly impacts conversion.
SceneCraft works with a variety of product types: from furniture and home decor to electronics and packaged goods. Users can guide the output using simple prompts to control the style of the scene: cozy living room, modern office, rustic kitchen, and more. The model supports variations such as close-up views, scene changes, and even seasonal or thematic adaptations. With built-in realism and design intelligence, SceneCraft eliminates the need for physical staging or 3D mockups, helping brands create rich, consistent imagery at scale with just one click.
Other Popular Models
sdxl-img2img
SDXL Img2Img is used for text-guided image-to-image translation. This model uses the weights from Stable Diffusion to generate new images from an input image using StableDiffusionImg2ImgPipeline from diffusers

idm-vton
Best-in-class clothing virtual try on in the wild

fooocus
Fooocus enables high-quality image generation effortlessly, combining the best of Stable Diffusion and Midjourney.

faceswap-v2
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
