ShuttleAI provides an API to remove the background from images using our AI model. This guide will walk you through how to use the API to remove the background from an image.
POST https://api.shuttleai.com/v1/removebg
To remove the background from an image, send a POST request to the endpoint with the following JSON body:
image
: The image to process, encoded in base64 format.Here is an example of how to send a request using curl
:
The API will respond with a JSON object containing the URL of the processed image:
model
: The model used for processing, which is shuttle-rbg
.data.url
: The URL where the processed image can be accessed.Here is an example of a successful response:
To encode an image in base64, you can use various tools and libraries. Here is an example using Python: