Bria Lifestyle Product Shot by Text Serverless API
Transform isolated product images into dynamic lifestyle scenes with AI-driven contextual realism.
POST /v2/bria-lifestyle-shot-by-text · submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "bria-lifestyle-shot-by-text",
9 fast=True,
10 image_url="https://segmind-resources.s3.amazonaws.com/input/e7c734c4-9c4a-42f6-8df0-dc946b863191-45d0cf11ce028ea08ddf7aca1c2c38ad.jpeg",
11 scene_description="A classroom setting with desks and books",
12 optimize_description=True,
13 exclude_elements="no people",
14 placement_type="automatic",
15 original_quality=False,
16 force_rmbg=False,
17 content_moderation=False,
18)
19print(result["status"]) # COMPLETED
20print(result.get("output")) # model output (e.g. media URL)
21print(result["metrics"]["inference_time"]) # server compute seconds
22
23# --- Or submit + poll manually (track request_id, control the cadence) ---
24from segmind import SegmindClient, InferenceFailed, InferenceTimeout
25
26client = SegmindClient() # reads SEGMIND_API_KEY
27payload = {
28 "fast": True,
29 "image_url": "https://segmind-resources.s3.amazonaws.com/input/e7c734c4-9c4a-42f6-8df0-dc946b863191-45d0cf11ce028ea08ddf7aca1c2c38ad.jpeg",
30 "scene_description": "A classroom setting with desks and books",
31 "optimize_description": True,
32 "exclude_elements": "no people",
33 "placement_type": "automatic",
34 "original_quality": False,
35 "force_rmbg": False,
36 "content_moderation": False,
37}
38job = client.submit_async("bria-lifestyle-shot-by-text", **payload)
39print(job.request_id) # available immediately
40try:
41 result = job.wait(timeout=600, interval=1.0)
42except InferenceTimeout as e:
43 print("still running:", e.request_id)
44except InferenceFailed as e:
45 print("failed:", e.detail) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "bria-lifestyle-shot-by-text",
9 fast=True,
10 image_url="https://segmind-resources.s3.amazonaws.com/input/e7c734c4-9c4a-42f6-8df0-dc946b863191-45d0cf11ce028ea08ddf7aca1c2c38ad.jpeg",
11 scene_description="A classroom setting with desks and books",
12 optimize_description=True,
13 exclude_elements="no people",
14 placement_type="automatic",
15 original_quality=False,
16 force_rmbg=False,
17 content_moderation=False,
18)
19print(result["status"]) # COMPLETED
20print(result.get("output")) # model output (e.g. media URL)
21print(result["metrics"]["inference_time"]) # server compute seconds
22
23# --- Or submit + poll manually (track request_id, control the cadence) ---
24from segmind import SegmindClient, InferenceFailed, InferenceTimeout
25
26client = SegmindClient() # reads SEGMIND_API_KEY
27payload = {
28 "fast": True,
29 "image_url": "https://segmind-resources.s3.amazonaws.com/input/e7c734c4-9c4a-42f6-8df0-dc946b863191-45d0cf11ce028ea08ddf7aca1c2c38ad.jpeg",
30 "scene_description": "A classroom setting with desks and books",
31 "optimize_description": True,
32 "exclude_elements": "no people",
33 "placement_type": "automatic",
34 "original_quality": False,
35 "force_rmbg": False,
36 "content_moderation": False,
37}
38job = client.submit_async("bria-lifestyle-shot-by-text", **payload)
39print(job.request_id) # available immediately
40try:
41 result = job.wait(timeout=600, interval=1.0)
42except InferenceTimeout as e:
43 print("still running:", e.request_id)
44except InferenceFailed as e:
45 print("failed:", e.detail)API Endpoint
https://api.segmind.com/v1/bria-lifestyle-shot-by-textParameters
aspect_ratiooptionalstringDefines output image proportions. Set '16:9' for widescreen or '1:1' for a square frame.
"1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"content_moderationoptionalbooleanApplies moderation to visuals. Enable for content checks before generation or disable for faster processing.
falseexclude_elementsoptionalstringSpecifies elements to exclude from the scene. Use 'no people' to remove human figures.
"no people"fastoptionalbooleanFast mode balances speed and quality. Set to true for quick generation or false for detailed results.
trueforce_rmbgoptionalbooleanForces removal of backgrounds. Use true to cleanly isolate product images from noisy backgrounds.
falseimage_urloptionalstring (uri)URL of the product image to blend in a scene. Use high-res images for quality outputs.
"https://segmind-resources.s3.amazonaws.com/input/e7c734c4-9c4a-42f6-8df0-dc946b863191-45d0cf11ce028ea08ddf7aca1c2c38ad.jpeg"optimize_descriptionoptionalbooleanEnables AI to enhance scene details. Set true to enhance scene realism or false to use the basic description.
trueoriginal_qualityoptionalbooleanMaintains image quality if true. Toggle on to preserve details in original placement mode.
falseplacement_typeoptionalstringDetermines product placement control. Choose 'original' for fixed spots or 'automatic' for varied angles.
"automatic""original""automatic""manual_placement""manual_padding""custom_coordinates""automatic_aspect_ratio"scene_descriptionoptionalstringDescribes the scene for the product. Use vivid settings like 'modern office desk' for best results.
"A classroom setting with desks and books"skuoptionalstringOptional SKU identifier for tracking products. Use unique codes for easier inventory management.
Response Type
Returns: Image
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/bria-lifestyle-shot-by-textSubmit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- A FAILED request is served as HTTP 422 — the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
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