Bria Product Shadow Serverless API

Bria Product Shadow enhances product images with realistic shadows for professional eCommerce presentations.

~8.05s
$0.04 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/bria-product-shadow"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "image_url": "https://segmind-resources.s3.amazonaws.com/input/a146bc0b-0223-444b-850b-08271689e74e-bae580eab92a46be381d5d16e53a82c9.jpeg",
12    "type": "regular",
13    "background_color": "#8C92AC",
14    "shadow_color": "#000000",
15    "shadow_intensity": 75,
16    "preserve_alpha": true
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22    result = response.json()
23    print(json.dumps(result, indent=2))
24else:
25    print(f"Error: {response.status_code}")
26    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/bria-product-shadow

Parameters

background_coloroptional
string

Background color for image as hex code. Use '#FFFFFF' for white background.

Default: "#8C92AC"
content_moderationoptional
boolean

Check for inappropriate content. Use 'true' for screening.

Default: false
force_rmbgoptional
boolean

Remove background even if alpha exists. Use 'true' to force.

Default: false
image_urloptional
string (uri)

URL for product image with transparent background. Example: use 'png' for optimal results.

Default: "https://segmind-resources.s3.amazonaws.com/input/a146bc0b-0223-444b-850b-08271689e74e-bae580eab92a46be381d5d16e53a82c9.jpeg"
preserve_alphaoptional
boolean

Keep transparency from input image. Set 'false' to discard.

Default: true
shadow_bluroptional
integer

Adjust shadow blur edges. '10' for sharper look.

Default: 15
shadow_coloroptional
string

Set shadow color using hex code. Example: '#000000' for black shadow.

Default: "#000000"
shadow_heightoptional
integer

Control shadow height, in pixels. Example: '80' for more height.

Default: 80
shadow_intensityoptional
integer

Control shadow darkness, 0 to 100. Example: '75' for darker shadow.

Default: 75Range: 0 - 100
shadow_widthoptional
integer

Set shadow width in pixels. Example: '100' for more width.

Default: 0
skuoptional
string

Unique SKU identifier for product. Example: 'SKU12345'.

typeoptional
string

Choose shadow style: 'regular' or 'float'. Use 'float' for 3D effect.

Default: "regular"
Allowed values :
"regular""float"

Response Type

Returns: Image

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out