Product Shot Editing
//
Tires Refinement
Description Enhances the appearance of the vehicle tires by adding realistic textures that match specific surfaces - snow, mud, grass.
This endpoint accepts a binary mask of all tires and returns the image with refined tires. You can optionally receive the refined wheels as a separate layer.
Security
api_token
The URL of the image containing the vehicle. If both image_url and file are provided, image_url takes precedence. Accepted formats are jpeg, jpg, png, webp.
The image file in base64 format. Used only if image_url is not provided. Accepted formats are jpeg, jpg, png, webp.
POST
# 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/refine_tires",
headers={"api_token": os.environ["BRIA_API_TOKEN"]},
json={
"image_url": "https://example.com/car.jpg",
"masks": {
"tires": "https://example.com/masks/tires.png",
},
"layers": True,
},
timeout=120,
)
response.raise_for_status()
print(response.json())Response
- layers_false
- layers_true
{ "url": "https://example.com/results/full_image_refined_1.png", "seed": 123 }