# Lifestyle Product Shot by Text Creates enriched product shots by placing them in various environments using textual descriptions. In addition, you can adjust the background of the product by replacing it with a solid color. To do this, specify a hex color code (e.g., #FF5733) in the . This feature is only available when generating a single result (). This endpoint also allows adjusting the position of the product and the size of the final product shot. This enables the creation of new and unique variations of your original product image while maintaining control over layout and format. To control product positioning and shot dimensions, use the parameter, which offers several control modes: - : preserves the original position and size of the product from the input image. - : generates results with 7 recommended placements, while the shot_size is defined by the 'shot_size' parameter. - : allows choosing from predefined positions using . The shot_size is defined by the 'shot_size' parameter. - : provides full control over the product's size and location using and . The shot_size is defined by the 'shot_size' parameter. - : lets you define padding in pixels around the product to control both size and placement. - : centers the product and resizes the canvas automatically to match the specified . The parameters used for positioning and sizing depend on the selected . Refer to the documentation for each mode to understand the supported fields and behaviors. This API endpoint supports content moderation via an optional parameter that can prevent processing if input images contain inappropriate content, and filters out unsafe modified images - the first blocked input image will fail the entire request. Endpoint: POST /product/lifestyle_shot_by_text ## Header parameters: - `api_token` (string, required) API token associated with the organization. ## Request fields (application/json): - `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 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` (string) This parameter allows you to select the control mode for determining both the product's positioning and the final shot size. - "original" will preserve the original position of the product in the image. The parameters , , , , , , and will be ignored when this mode is used. - "automatic" will generate results with 7 of the recommended product positions. The shot_size is defined by the 'shot_size' parameter. - "manual_placement" will allow you to select predefined positions, using the parameter "manual_placement_selection". The shot_size is defined by the 'shot_size' parameter. - "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. The shot_size is defined by the 'shot_size' parameter. - "manual_padding" will allow you to control the position and size of the image by defining the desired padding (using 'padding_values') in pixels around the product. - "automatic_aspect_ratio" will automatically center the product within the canvas and resize the canvas to match the provided . The parameters , , , , , and will be ignored when this mode is used. Enum: "original", "automatic", "manual_placement", "manual_padding", "custom_coordinates", "automatic_aspect_ratio" - `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. - `aspect_ratio` (string) Defines the aspect ratio of the output product shot when is set to . The original image will be automatically positioned and scaled to fit this aspect ratio. Ignored for all other placement types. Enum: "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9" - `shot_size` (array) 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` (array) 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. This parameter is only relevant when placement_type is custom_coordinates. - `foreground_image_location` (array) 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. This parameter is only relevant when placement_type is custom_coordinates. - `manual_placement_selection` (array) 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. Enum: "upper_left", "upper_right", "bottom_left", "bottom_right", "right_center", "left_center", "upper_center", "bottom_center", "center_vertical", "center_horizontal" - `padding_values` (array) 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. - `content_moderation` (boolean) When enabled, applies content moderation to both input visuals and modified outputs. For input images: - Processing stops at the first image that fails moderation - Returns a 422 error with details about which parameter failed For synchronous requests (sync=true): - If all modified images fail moderation, returns a 422 error - If some images pass and others fail, returns a 200 response with successful outputs and "blocked" objects for failed ones For asynchronous requests (sync=false): - Failed images are replaced with zero-byte files at their placeholder URLs - Successful images are stored at their original placeholder URLs ## Response 200 fields (application/json): - `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. 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 content_moderation is true: - For synchronous requests (sync=true): Results array will contain both successful generations and "blocked" objects for images that failed moderation - For asynchronous requests (sync=false): Failed images will be replaced with zero-byte files at their placeholder URLs