v1

latestOpenAPI 3.0.02026-08-061612131.2 KB
Product Endpoints

Product Shadow

Try out this capability in Bria's sandbox

Description

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.

This API endpoint supports content moderation via an optional parameter that can prevent processing if input images contain inappropriate content or if the modified output would contain inappropriate content.

post/product/shadow

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.

image_urlstring

The URL of the product image or product cutout. If both image_url and 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.

filestring

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.

typestring

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

background_colorstring

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_colorstring

The shadow color hex code. This parameter is optional.

shadow_offsetinteger[]

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_intensityinteger

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

shadow_blurinteger

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_widthinteger

(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_heightinteger

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

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.

preserve_alphaboolean

Controls whether the alpha channel values from the input image are retained in the output, if the input includes an alpha channel.

  • When true: The output image maintains the original transparency of fully and partially transparent pixels.
  • When false: The transparency values from the input are not preserved, but the output may still include an alpha channel (e.g., around the cropped area).
  • Has no effect if the input image does not include an alpha channel.
content_moderationboolean

When enabled, applies content moderation to both input visuals and modified outputs.

For input images:

  • Processing stops if the image fails moderation
  • Returns a 422 error with details about which parameter failed

For output images:

  • If the modified image fails moderation, returns a 422 error

Response

Successful operation.

result_urlstring

The URL of the processed product pack shot image. This is a temporary URL that expires after 1 hour.