v1

latestOpenAPI 3.0.02026-07-13650400.5 KB
Product Shots Generation

Lifestyle Product 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>.

post/product/lifestyle_shot_by_image

Headers

api_tokenstring required

API token associated with the organization.

Request body

skustring

The Stock Keeping Unit identifier for the product. This parameter is optional.

syncboolean

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_urlstring

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.

filestring

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_urlstring[]

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_filestring[]

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_imageboolean

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_influencenumber 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_resultsinteger

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_qualityboolean

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_sizeinteger[]

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_sizeinteger[]

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_locationinteger[]

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_selectionstring[]

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_valuesinteger[]

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_rmbgboolean

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

Successful operation.

Example response

{
  "result": [
    [
      "result_url",
      244184855,
      "ef3d9a20-4d5d-11ee-8741-8e22fc45bbfc.JPEG"
    ]
  ]
}