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

# Lifestyle Product Shot by Image

`POST /product/lifestyle_shot_by_image`

Generates enriched product shots by placing them in visually compelling environments, guided by a reference image. 

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 powered by BRIA 2.3 ControlNet BG-Gen (<a href="https://huggingface.co/briaai/BRIA-2.3-ControlNet-BG-Gen" target="_blank">HF model card</a>) and BRIA 2.3 IP-Adapter (<a href="https://huggingface.co/briaai/BRIA-2.3-ControlNet-BG-Gen" target="_blank">HF model card</a>). You can explore the Hugging Face demo space for this pipeline <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.
  - `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.
  - `ref_image_url` string[] — The URL of the reference image to be used for generating the lifestyle shot. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.
  - `ref_image_file` string[] — The reference image file to be used for generating the lifestyle shot, in base64 format. Only a single refernce image is supported at the moment. Used if ref_image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.
  - `enhance_ref_image` boolean — When set to True, enhances the reference image by applying adjustments, such as lighting, shadows, and texture refinements, to produce more realistic and visually cohesive results. When enabled, this may also incorporate subtle elements from the reference image into the generated background for added authenticity.
  - `ref_image_influence` number, float — Controls the degree of similarity between the generated background and the reference image, where 0.0 produces minimal resemblance and 1.0 creates a highly similar output.
  - `num_results` integer — The number of lifestyle product shots you would like to generate.
  - `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 (and not the reference image 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.
    - 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)
