Car Background Removal (Binary)#
Cut the car out of a photo and return an RGBA PNG with its cast shadow baked in, at the photo's framing.
Cost: 1 credit on HTTP 200.
The biggest car in the photo is used. Windows are made see-through by default (reconstruct_windows=true).
To get separate layers (composite, cutout, shadow, background), use /v1.0/car-layers-base64. Response metadata is returned in X-Input-Dimensions, X-Processed-Dimensions, and X-Was-Downscaled.
Endpoint#
POST /v1.0/car-image-without-background
Base URL: https://api.withoutbg.com · Spec: openapi.json
Example (cURL)#
cURL
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"Authentication#
Provide your API key in the request header:
API key header
X-API-Key: <your_api_key>Request#
Content-Type: multipart/form-data
Fields#
file(string, required) — Car image file (JPEG, PNG, WebP, AVIF, HEIC, TIFF, BMP, GIF). Maximum size: 20.0 MB.reconstruct_windows(boolean, optional) · defaulttrue— When true (default), run car window reconstruction: opens glass interiors while keeping the car outline. Set false to skip and use the base silhouette alpha only.
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`).
Errors#
| Status | Description | Detail |
|---|---|---|
401 | Invalid API Key | Invalid API Key |
402 | Insufficient credit. Please top up API credits. | Insufficient credit. Please top up API credits. |
403 | Credits Expired. Please top up API credits. If you have existing credits, they will be reactivated. | 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. | 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. | Unsupported Media Type. Supported formats are: JPEG, PNG, WebP, AVIF, HEIC, TIFF, BMP, GIF. |
422 | Validation Error | Validation Error |
429 | Rate limit exceeded (product policy: 30 requests/minute per API key). May be returned by the API gateway. Retry with exponential backoff. | {"error":"Too Many Requests","status":429,"message":"Rate limit exceeded. Please try again later"} |
500 | Internal Server Error | Internal Server Error. Please contact support: contact@withoutbg.com |
Related endpoints#
- Car Background (Binary) —
POST/v1.0/car-background - Car Layers (Base64) —
POST/v1.0/car-layers-base64
Contract sections are generated at build time from OpenAPI. Markdown mirror: /docs/pro-model/car-background-removal-binary.md