Product Shots Generation

Product Cutout

This capability allows you to create a precise cutout of a product from any given image. This feature is especially valuable for eCommerce platforms and applications, serving as a fundamental building block for crafting a user-friendly interface.

The following interactive Colab notebook demonstrates how to use this API effectively. Explore the example code and try it out for yourself to fully appreciate the potential of this suite.

Request
header Parameters
api_token
required
string

API token associated with the organization

Request Body schema: application/json
sku
string

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

image_url
string

The URL of the image containing the product to be cut out. 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 image file containing the product to be cut out, in base64 format. Used if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

Responses
200

Successful operation.

400

Bad request.

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.

post/product/cutout
Request samples
Response samples
application/json
{
  • "result_url": "URL"
}

Product Packshot

The Product Pack Shot feature is designed to create professional standard pack shots. The output is a 2000x2000 px image, with the product size and location according to best practices. This feature can allow users to take any photo of a product and transform it into a professional pack shot, placing the product on a clean, seamless background, typically white but customizable to any color.

The following interactive Colab notebook demonstrates how to use this API effectively. Explore the example code and try it out for yourself to fully appreciate the potential of this suite.

Request
header Parameters
api_token
required
string

API token associated with the organization.

Request Body schema: application/json
sku
string

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

image_url
string

The URL of the product image or product cutout. 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 image or product cutout file, in base64 format. Used if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

background_color
string
Default: "#FFFFFF"

The background hex color code for the pack shot. Optionally, use 'transparent' for a transparent background. This parameter is optional.

Responses
200

Successful operation.

400

Bad request.

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.

post/product/packshot
Request samples
Response samples
application/json
{
  • "result_url": "URL"
}

Product Shadow

The Product Shadow API allows you to add consistent and customizable shadow to a product cutout. This feature is designed to work in combination with other capabilities like product cutout, product packshot and product lifestyle shots, enhancing the visual appeal of e-commerce and product imagery.

If the product image isn't a product cutout, you should use the product cutout API first. The product shadow API accepts a product cutout as input. Once you have a product cutout with a shadow, you can use it in product packshot or product lifestyle shot APIs, where needed.

The following interactive Colab notebook demonstrates how to use this API effectively. Explore the example code and try it out for yourself to fully appreciate the potential of this suite.

Request
header Parameters
api_token
required
string

API token associated with the organization.

Request Body schema: application/json
sku
string

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

image_url
string

The URL of the product image or product cutout. 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. The input image must have a transparent background, could be obtained by using our background removal or cutout features.

file
string

The product image or product cutout file, in base64 format. Used if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. The input image must have a transparent background, could be obtained by using our background removal or cutout features.

type
string
Default: "regular"

Specifies the type of shadow. It can be 'regular' or 'float'. This parameter is optional.

background_color
string

The background hex color code for the resulting image. If you would like to get a transparent background, don't include this parameter in the request. This parameter is optional.

shadow_color
string
Default: "#000000"

The shadow color hex code. This parameter is optional.

shadow_offset
Array of integers
Default: [0,15]

Controls the position of the shadow relative to the object, in pixels. Accepts a tuple-like list [x, y] where x and y can be positive or negative values. This parameter is optional.

shadow_intensity
integer [ 0 .. 100 ]
Default: 60

Adjusts the intensity of the shadow. This parameter is optional.

shadow_blur
integer

Controls the blur level of the shadow's edges. This parameter is optional. Default for 'shadow_type'=regular is 15, while for 'shadow_type'=float is 20.

shadow_width
integer

(For floating shadows) Controls the width of the elliptical shadow, in pixels that could be positive and negative. As default the value is according to the width of the product. This parameter is optional.

shadow_height
integer
Default: 70

(For floating shadows) Controls the height of the elliptical shadow, in pixels that could be positive and negative. This parameter is optional.

Responses
200

Successful operation.

400

Bad request.

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.

post/product/shadow
Request samples
Response samples
application/json
{
  • "result_url": "URL"
}

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

The following interactive Colab notebook demonstrates how to use this API effectively. Explore the example code and try it out for yourself to fully appreciate the potential of this suite.

Request
header Parameters
api_token
required
string

API token associated with the organization.

Request Body schema: application/json
sku
string

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

sync
boolean
Default: false

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
Default: true

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
Default: true

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
Default: 4

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 control the positioning of the product in the image. Choosing 'original' will preserve the original position of the product in the image. Choosing 'automatic' will generate results with the 10 recommended positions for the product. Choosing 'manual_placement' will allow you to select predefined positions (using the parameter 'manual_placement_selection'). Selecting 'manual_padding' will allow you to control the position and size of the image by defining the desired padding in pixels around the product.

Enum: "original" "automatic" "manual_placement" "manual_padding"
original_quality
boolean
Default: false

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
Array of integers
Default: [1000,1000]

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=automatic or placement_type=manual_placement.

manual_placement_selection
Array of strings
Default: ["upper_left"]

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.

Items Enum: "upper_left" "upper_right" "bottom_left" "bottom_right" "right_center" "left_center" "upper_center" "bottom_center" "center_vertical" "center_horizontal"
padding_values
Array of integers
Default: [0,0,0,0]

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.

Responses
200

Successful operation.

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.

post/product/lifestyle_shot_by_text
Request samples
Response samples
application/json
{
  • "result": [
    ]
}

Lifestyle Product Shot by Image (Coming Soon)

Generates product images in enriched environments using a reference image for inspiration. 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.

Request
header Parameters
api_token
required
string

API token associated with the organization.

Request Body schema: application/json
sku
string

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

sync
boolean
Default: false

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.

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.

reference_image_url
string

The URL of the reference image to be used for generating the lifestyle shot. If both reference_image_url and reference_image_file are provided, reference_image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

reference_image_file
string

The reference image file to be used for generating the lifestyle shot, in base64 format. Used if reference_image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

num_results
integer
Default: 1

The number of lifestyle product shots you would like to generate. When placement_type is automatic or manual_placement, num_results should be 1. You will get 10 results when automatic and according to the number of required placements if manual_placement.

placement_type
string

This parameter allows you to control the positioning of the product in the image. Choosing 'original' will preserve the original position of the product in the image. Choosing 'automatic' will generate results with the 10 recommended positions for the product. Choosing 'manual_placement' will allow you to select predefined positions (using the parameter 'manual_placement_selection'). Selecting 'manual_padding' will allow you to control the position and size of the image by defining the desired padding in pixels around the product.

Enum: "original" "automatic" "manual_placement" "manual_padding"
shot_size
Array of integers
Default: [1000,1000]

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=automatic or placement_type=manual_placement.

manual_placement_selection
Array of strings
Default: ["upper_left"]

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.

Items Enum: "upper_left" "upper_right" "bottom_left" "bottom_right" "right_center" "left_center" "upper_center" "bottom_center" "center_vertical" "center_horizontal"
padding_values
Array of integers
Default: [0,0,0,0]

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.

Responses
200

Successful operation.

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.

post/product/lifestyle_shot_by_image
Request samples
Response samples
application/json
{
  • "result": [
    ]
}

Consistent Product Shots (Coming Soon)

Description This feature allows users to create consistent product shots by providing either a textual description of a scene or an image, along with a group of product images. The resulting consistent product shots are ideal for use on social media, eCommerce websites, product catalogs, and other marketing materials, ensuring a uniform and professional appearance across all platforms.

Responses
200

Successful operation.

post/products/consistent_shots
Request samples

Contextual Keyword Extraction (Coming Soon)

Description This feature allows users to extract relevant keywords from an image and its context, focusing on the primary product rather than secondary elements. This capability enhances search optimization in eCommerce by ensuring that the keywords accurately represent the product being sold. It can be particularly useful for improving product searchability on eCommerce websites, enhancing SEO for product listings, automating content management, and optimizing social media marketing efforts.

Responses
200

Successful operation.

post/product/contextual_keyword_extraction
Request samples