Bria Lifestyle Product Shot by Text Serverless API

Transform isolated product images into dynamic lifestyle scenes with AI-driven contextual realism.

~25.59s
$0.04 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/bria-lifestyle-shot-by-text"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "fast": true,
12    "image_url": "https://segmind-resources.s3.amazonaws.com/input/e7c734c4-9c4a-42f6-8df0-dc946b863191-45d0cf11ce028ea08ddf7aca1c2c38ad.jpeg",
13    "scene_description": "A classroom setting with desks and books",
14    "optimize_description": true,
15    "exclude_elements": "no people",
16    "placement_type": "automatic",
17    "original_quality": false,
18    "force_rmbg": false,
19    "content_moderation": false
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25    result = response.json()
26    print(json.dumps(result, indent=2))
27else:
28    print(f"Error: {response.status_code}")
29    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/bria-lifestyle-shot-by-text

Parameters

aspect_ratiooptional
string

Defines output image proportions. Set '16:9' for widescreen or '1:1' for a square frame.

Allowed values :
"1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"
content_moderationoptional
boolean

Applies moderation to visuals. Enable for content checks before generation or disable for faster processing.

Default: false
exclude_elementsoptional
string

Specifies elements to exclude from the scene. Use 'no people' to remove human figures.

Default: "no people"
fastoptional
boolean

Fast mode balances speed and quality. Set to true for quick generation or false for detailed results.

Default: true
force_rmbgoptional
boolean

Forces removal of backgrounds. Use true to cleanly isolate product images from noisy backgrounds.

Default: false
image_urloptional
string (uri)

URL of the product image to blend in a scene. Use high-res images for quality outputs.

Default: "https://segmind-resources.s3.amazonaws.com/input/e7c734c4-9c4a-42f6-8df0-dc946b863191-45d0cf11ce028ea08ddf7aca1c2c38ad.jpeg"
optimize_descriptionoptional
boolean

Enables AI to enhance scene details. Set true to enhance scene realism or false to use the basic description.

Default: true
original_qualityoptional
boolean

Maintains image quality if true. Toggle on to preserve details in original placement mode.

Default: false
placement_typeoptional
string

Determines product placement control. Choose 'original' for fixed spots or 'automatic' for varied angles.

Default: "automatic"
Allowed values :
"original""automatic""manual_placement""manual_padding""custom_coordinates""automatic_aspect_ratio"
scene_descriptionoptional
string

Describes the scene for the product. Use vivid settings like 'modern office desk' for best results.

Default: "A classroom setting with desks and books"
skuoptional
string

Optional SKU identifier for tracking products. Use unique codes for easier inventory management.

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