# Car Background Removal (Binary)

Remove background from a car photo and return an RGBA PNG.

**Cost:** 1 credit on HTTP 200.

Preferred migration path for vehicle clients. Accepts reserved form fields `include_shadow` and `translucent_windows` (currently ignored).

Binary sibling of `/v1.0/car-image-without-background-base64`. Response metadata is returned in `X-Input-Dimensions`, `X-Processed-Dimensions`, `X-Was-Downscaled`, and optional `X-Image-Type-*` headers.

---

## Endpoint

**POST** `/v1.0/car-image-without-background`

Base URL: `https://api.withoutbg.com`

## Authentication

Provide your API key in the request header:

```
X-API-Key: <your_api_key>
```

## Request

**Content-Type:** `multipart/form-data`

### Fields

- `file` *(binary, required)* — Car image file (JPEG, PNG, WebP, AVIF, HEIC, TIFF, BMP, GIF). Maximum size: 20.0 MB.
- `include_shadow` *(boolean, optional)* — When true, keep/generate a soft shadow under the car. Reserved for an upcoming model feature; currently ignored.
- `translucent_windows` *(boolean, optional)* — When true, treat car windows as translucent rather than opaque. Reserved for an upcoming model feature; currently ignored.

## Response

**Success Content-Type:** `image/png`

### Response headers

- `X-Input-Dimensions` — Decoded input size as `width,height` (pixels).
- `X-Processed-Dimensions` — Size after server prep downscale (longest side / megapixel caps) as `width,height`. Not the model inference resolution (~1024 long side).
- `X-Was-Downscaled` — Whether the input was downscaled during server prep (`true`/`false`).
- `X-Image-Type-Photo` — Optional photo-class probability from image-type classifier.
- `X-Image-Type-Graphic` — Optional graphic-class probability from image-type classifier.

## Errors

| Status | Description |
|--------|-------------|
| 401 | Invalid API Key |
| 402 | Insufficient credit. Please top up API credits. |
| 403 | Credits Expired. Please top up API credits. If you have existing credits, they will be reactivated. |
| 413 | File size too large. Maximum file size is 20.0 MB |
| 415 | Unsupported Media Type. Supported formats are: JPEG, PNG, WebP, AVIF, HEIC, TIFF, BMP, GIF. |
| 422 | Validation Error |
| 429 | {"error":"Too Many Requests","status":429,"message":"Rate limit exceeded. Please try again later"} |
| 500 | Internal Server Error. Please contact support: contact@withoutbg.com |

## Example (cURL)

```bash
curl -X POST \
  -H "X-API-Key: $WITHOUTBG_API_KEY" \
  -F "file=@/path/to/input.jpg" \
  --output result.png \
  "https://api.withoutbg.com/v1.0/car-image-without-background"
```

---

Source of truth: [OpenAPI](https://api.withoutbg.com/openapi.json) · Docs: [/docs/pro-model/car-background-removal-binary](/docs/pro-model/car-background-removal-binary)
