Description Generates realistic reflections on relevant surfaces of a product image, such as glass, metal, or glossy materials.
Reflection masks can be provided manually or generated automatically using our segmentation tools.
The output includes an updated image with applied reflections and optional reflection layers per region.
The URL of the vehicle shot. If both image_url and file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Max file size 12MB.
The vehicle shot file in base64 format. Used only if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Max file size 12MB.
An object containing URLs to binary masks for each region to apply reflections on. Accepted keys are windshield, rear_window, side_windows, body, wheels.
If true, returns separate images per region along with the full composite. If false, only the full image is returned.
# The Python SDK covers v2 endpoints; call this v1 endpoint over HTTP.
import os
import httpx
response = httpx.post(
"https://engine.prod.bria-api.com/v1/product/vehicle/generate_reflections",
headers={"api_token": os.environ["BRIA_API_TOKEN"]},
json={
"image_url": "https://example.com/car.jpg",
"masks": {
"windshield": "https://example.com/masks/windshield.png",
"side_windows": "https://example.com/masks/side_windows.png",
"body": "https://example.com/masks/body.png",
"wheels": "https://example.com/masks/wheels.png",
},
"layers": True,
"seed": 42,
},
timeout=120,
)
response.raise_for_status()
print(response.json())- layers_false
- layers_true
{ "url": "https://example.com/results/full_image_with_reflections.png", "seed": 123 }