---
title: "Segmentation"
method: POST
path: "/product/vehicle/segment"
tags: ["Automotive Endpoints"]
---

# Segmentation

`POST /product/vehicle/segment`

[**Try out this capability in Bria's Automobile Playground**](https://console.bria.ai/automotive)

**Description**
Generates segmentation masks for specific vehicle parts from an input image, enabling further enhancements such as reflection generation or wheel refinement.  


This endpoint returns separate binary masks for each segmented region, including windows, wheels, and body parts. If a specific part is not detected in the image, it will be returned with an empty URL.  


The API supports input via image URL or base64-encoded image file, and also includes optional content moderation.

## Headers

- `api_token` string, required

## Request body

- object
  - `image_url` string — The URL of the image containing the vehicle to segment. If both image_url and file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Max file size 12MB.
  - `file` string — Base64-encoded image containing the vehicle to segment. Used only if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Max file size 12MB.

## Response `200`

Segmentation masks successfully generated.

- object
  - `windshield` string — URL to the PNG mask of the windshield. Empty string if not detected.
  - `rear_window` string — URL to the PNG mask of the rear window. Empty string if not detected.
  - `side_windows` string — URL to the PNG mask of the side windows. Empty string if not detected.
  - `body` string — URL to the PNG mask of the vehicle body. Empty string if not detected.
  - `wheels` string — URL to the PNG mask of all visible wheels. Empty string if not detected.
  - `hubcap` string — URL to the PNG mask of all visible hubcaps. Empty string if not detected.
  - `tires` string — URL to the PNG mask of all visible hubcaps. Empty string if not detected.

## Other responses

- `400` — Bad request. Missing or invalid parameters.
- `401` — Unauthorized. Invalid API key or authentication token.
- `403` — Forbidden
- `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. Supported types - jpeg, jpg, png, webp.
- `422` — Unprocessable Content
- `429` — Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
- `460` — Failed to download image.
- `500` — Internal server error. An error occurred on the server.

---

[API](https://skmtc.net/bria-ai/apis/product-shot-api-reference.md) · [All operations](https://skmtc.net/bria-ai/apis/product-shot-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bria-ai/product-shot-api-reference/versions/02853e3865f7/schema)
