API Documentation
Welcome to the BG Remover Pro API documentation. Our API provides a simple programmatic interface to our powerful background removal technology. You can integrate our service into your website, application, or workflow to automate image processing at scale.
Authentication
All API requests require authentication. You must include your unique API key in the `X-Api-Key` header of every request.
X-Api-Key: your-secret-api-key-12345
You can get your free sandbox API key from our API page. Requests made without a valid key will result in a `401 Unauthorized` error.
POST /api/v1/remove
This is the primary endpoint for removing the background from an image.
Request
Body
The request body must be a `multipart/form-data` payload containing the image file.
| Parameter | Type | Description |
|---|---|---|
| image_file | File | The image file (JPG or PNG) to process. Max size: 10MB. |
Responses
200 OK
The background was removed successfully. The response body will contain the binary data of the resulting PNG image.
400 Bad Request
The request was malformed, likely because the `image_file` part was missing.
401 Unauthorized
The request is missing a valid `X-Api-Key` header.
Code Examples
--header 'X-Api-Key: your-secret-api-key-12345' \
--form 'image_file=@"/path/to/your/image.jpg"' \
--output result.png