Bria Lifestyle Product Shot by Text Serverless API

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

~25.27s
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)

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

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. 1
    POST /v2/bria-lifestyle-shot-by-text

    Submitreturns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Polluntil COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Resultfinal response body

Status states

QUEUEDAccepted, waiting for a worker
PROCESSINGRunning on a worker
COMPLETEDDone — result body is ready
FAILEDErrored (incl. content/RAI blocks)
  • 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.

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