---
title: "Lifestyle Product Shot by Text"
method: POST
path: "/product/lifestyle_shot_by_text"
tags: ["Product Shots Generation"]
---

# Lifestyle Product Shot by Text

`POST /product/lifestyle_shot_by_text`

Creates enriched product shots by placing them in various environments using textual descriptions. 

Additionally, you can change the image size of the final result as well as the positioning of the product in the image. This will enable you to create new and unique variations of your original image.

This capability is based on our BRIA 2.3 ControlNet BG-Gen. HF model card is available <a href="https://huggingface.co/briaai/BRIA-2.3-ControlNet-BG-Gen" target="_blank">here</a>. HF demo space of this pipeline can be found <a href="https://huggingface.co/spaces/briaai/Product-Shot-Generation" target="_blank">here</a>.

## Headers

- `api_token` string, required

## Request body

- object
  - `sku` string — The Stock Keeping Unit identifier for the product. This parameter is optional.
  - `sync` boolean — Determines the response mode. When true, responses are synchronous. With false, responses are asynchronous, immediately providing URLs for images that are generated in the background. It is recommended to use sync=false for optimal performance. When generating more than 1 result, you should use the value false. When placement_type is automatic, sync has to be false.
  - `fast` boolean — Determines the generation mode. When true, the generation will utilize the fast mode which provides the best balance between speed and quality. The false, the regular mode will be utilized.
  - `image_url` string — The URL of the product shot to be placed in a lifestyle shot. If both image_url and image_file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.
  - `file` string — The product shot file to be placed in a lifestyle shot, in base64 format. Used if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.
  - `scene_description` string — Text description of the new scene or background for the provided product shot. Bria currently supports prompts in English only, excluding special characters.
  - `optimize_description` boolean — When true, an additional logic takes the scene_description that was included and adjusts it to achieve optimal results. Built with Meta Llama 3.
  - `num_results` integer — The number of lifestyle product shots you would like to generate. You will get num_results x 10 results when placement_type=automatic and according to the number of required placements x num_results if placement_type=manual_placement.
  - `exclude_elements` string — Elements or features that should be excluded from the generated scene. This parameter is optional and is available only when fast=false. Bria currently supports descriptions in English only, excluding special characters.
  - `placement_type` 'original' | 'automatic' | 'manual_placement' | 'manual_padding' | 'custom_coordinates' — This parameter allows you to control the positioning of the product in the image. - **original** will preserve the original position of the product in the image. - **automatic** will generate results with 7 of the recommended positions for the product (all except the upper ones). - **manual_placement** will allow you to select predefined positions, using the parameter "manual_placement_selection". - **custom_coordinates** Provides precise control over the size and position of the image using the parameters "foreground_image_size" and "foreground_image_location". This includes positions outside the canvas, which may result in cropping. - **manual_padding** will allow you to control the position and size of the image by defining the desired padding in pixels around the product.
  - `original_quality` boolean — This flag is only relevant when placement_type=original. If true, the output image retains the original input image's size; otherwise, the image is scaled to 1 megapixel (1MP) while preserving its aspect ratio.
  - `shot_size` integer[] — The desired size of the final product shot. For optimal results, the total number of pixels should be around 1,000,000. This parameter is only relevant when placement_type is automatic,manual_placement or custom_coordinates.
  - `foreground_image_size` integer[] — Specifies the desired dimensions of the foreground image within the generated output. The size is defined as an array of integers representing [width, height] in pixels.
  - `foreground_image_location` integer[] — Specifies the desired [x, y] coordinates for positioning the foreground image within the full shot. The coordinates represent the upper-left corner of the foreground image. Values can extend outside the shot, in which case the input image will be cropped accordingly.
  - `manual_placement_selection` string[] — If you've selected placement_type=manual_placement, you should use this parameter to specify which placements/positions you would like to use from the list. You can select more than one placement in one request.
  - `padding_values` integer[] — The desired padding in pixels around the product, when using placement_type=manual_padding. The order of the values is [left, right, top, bottom]. For optimal results, the total number of pixels, including padding, should be around 1,000,000. It is recommended to first use the product cutout API, get the cutout and understand the size of the result, and then define the required padding and use the cutout as an input for this API.
  - `force_rmbg` boolean — Forces background removal, even if the original image already contains an alpha channel. Useful for refining existing foreground/background separation or ignoring unnecessary alpha channels.

## Response `200`

Successful operation.

- object
  - `result` array[] — The array contains the results created in the request. In each result, the first value represents the URL of the result, the second value represents the seed, and the third value represents the session id of the result. Bria recognizes offensive and inappropriate images. The URL will lead to a 0-byte file if an image like that is generated. It will take a few seconds for the image to become available via the URL if sync=false. You can recreate the same result in the future by using the seed as part of the request. When placement_type=automatic, each set of 10 results will use the following predefined placements, according to this order upper_left, upper_right, bottom_left, bottom_right, right_center, left_center, upper_center, bottom_center, center_vertical, center_horizontal. This means that the first result URL will include a result using the placement upper_left and so on.
    - unknown[]
      - unknown

## Other responses

- `400` — Bad request. Missing or invalid parameters.
- `401` — Unauthorized. Invalid API key or authentication token.
- `404` — Not found. Image could not be found at the provided URL.
- `413` — Payload too large. Image file size exceeds the 12MB limit.
- `415` — Unsupported media type. Invalid file type. Supported file types are jpeg, jpg, png, webp.
- `429` — Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
- `451` — Unavailable for legal reasons.
- `460` — Failed to download image.
- `500` — Internal server error. An error occurred on the server.

---

[API](https://skmtc.net/bria-ai/apis/the-bria-api.md) · [All operations](https://skmtc.net/bria-ai/apis/the-bria-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bria-ai/the-bria-api/revisions/2768230345a5/schema)
