/remove_background
APIThe /remove_background
API endpoint is a cornerstone of the PixelPioneer Image Processing Suite, providing users with a seamless solution for removing backgrounds from images. Leveraging advanced algorithms and customizable parameters, users can achieve precise background removal tailored to their specific requirements.
To ensure secure access to the PixelPioneer Image Processing Suite, users are required to include their unique API key in the request headers using the x-api-key
parameter. Use PixelPioneerRapid-9FK05IjcKk1MvXsjOsrsTFdkgsx01Mi6w5WsaNDvYBZAmu
for testing
This endpoint is accessible via the POST HTTP method, offering a robust framework for efficient background removal operations.
Users have the flexibility to define the model type for background removal using the model_type
parameter. Supported model types include “GENERAL”, “HUMAN”, “CLOTH”, “GENERALV2”, and “ANIME”. Additionally, users can specify a background color to be applied during the removal process using the bgcolor
parameter, formatted as a comma-separated RGB tuple (e.g., “255,255,255,255”).
Note that the bgcolor color parameter will only accept 4 numeric values corresponding to a color. Any other type of input will result in a 500
error.
The API expects users to upload one or more image files via the file
parameter in the request body. This facilitates the processing of images for background removal.
Upon successful processing, the API responds with a status code of 200 OK. For single image processing, the API returns the processed image file. In the case of multiple image processing, the API generates a zip file containing the processed images. In the event of errors, the API returns a JSON object containing a message
key describing the encountered error, with status codes ranging from 4xx to 5xx.