Code samples for calling the free demo CarCutter API.
You can easily process images and experiment with the different cut types via our Web UI at https://demo.car-cutter.com/.
Calling the public part of the CarCutter API is possible on Linux or Mac via the commands below.
Completely extracts the car from its background and places it into a rendered 3D showroom.
curl -X POST https://api.car-cutter.com/vehicle/composition/segment \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: multipart/form-data' \
-F cut_type=complete \
-F image=@images/source/front-left.jpg \
| base64 --decode > front-left_CC.jpg
Partly extracts the car from its background, extends the ground to an artificial horizon, and adds a backdrop.
curl -X POST https://api.car-cutter.com/vehicle/composition/segment \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: multipart/form-data' \
-F cut_type=normal \
-F image=@images/source/side-left.jpg \
| base64 --decode > side-left_NC.jpg
Blurs everything but the car, thus focusing the view.
curl -X POST https://api.car-cutter.com/vehicle/composition/segment \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: multipart/form-data' \
-F cut_type=blur \
-F image=@images/source/front.jpg \
| base64 --decode > front_BC.jpg