---
title: "Product Shadow"
method: POST
path: "/product/shadow"
tags: ["Product Shots Generation"]
---

# Product Shadow

`POST /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 <a href="https://colab.research.google.com/drive/1TNVR4n5wvLdJKPigkUg8wk7t8S_3b9t1?usp=sharing" target="_blank">Colab notebook</a> 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.

## Headers

- `api_token` string, required

## Request body

- object
  - `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 — 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 — The shadow color hex code. This parameter is optional.
  - `shadow_offset` integer[] — 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 — 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 — (For floating shadows) Controls the height of the elliptical shadow, in pixels that could be positive and negative. This parameter is optional.
  - `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_url` string — The URL of the processed product pack shot image. This is a temporary URL that expires after 1 hour.

## Other responses

- `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.

---

[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)
