Bria Product Packshot Serverless API
Transform product photos into professional, market-ready images with intelligent enhancements and background removal.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-product-packshot"
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/fd346304-76b4-4dfa-abca-3ba32a35ddf0-21a15249f703fcb53e03b65740531230.jpeg",
12 "background_color": "#FFFFFF",
13 "content_moderation": true
14}
15
16response = requests.post(url, headers=headers, json=data)
17
18if response.status_code == 200:
19 result = response.json()
20 print(json.dumps(result, indent=2))
21else:
22 print(f"Error: {response.status_code}")
23 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-product-packshot"
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/fd346304-76b4-4dfa-abca-3ba32a35ddf0-21a15249f703fcb53e03b65740531230.jpeg",
12 "background_color": "#FFFFFF",
13 "content_moderation": true
14}
15
16response = requests.post(url, headers=headers, json=data)
17
18if response.status_code == 200:
19 result = response.json()
20 print(json.dumps(result, indent=2))
21else:
22 print(f"Error: {response.status_code}")
23 print(response.text)API Endpoint
https://api.segmind.com/v1/bria-product-packshotParameters
image_urlrequiredstring (uri)Image URL is the input for processing. Ensure it's publicly accessible for best results.
"https://segmind-resources.s3.amazonaws.com/input/fd346304-76b4-4dfa-abca-3ba32a35ddf0-21a15249f703fcb53e03b65740531230.jpeg"background_coloroptionalstringSets the packshot background color. Use 'transparent' for no background or '#FFFFFF' for white.
"#FFFFFF"content_moderationoptionalbooleanModerates input for inappropriate content. Enable to prevent misuse.
trueforce_rmbgoptionalbooleanEnables background removal. Set true if refinement is needed on existing images.
falseskuoptionalstringSKU uniquely identifies a product. Use a meaningful identifier if available.
Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out