- Home
- Documentation
- Image without Background
Image without Background
Remove image backgrounds instantly - get transparent PNGs ready for any project. Works with Base64 or binary input.
Base64 Request & Response
For web apps, send your image as a Base64 string and receive a JSON response - simple API integration with one POST request.
POST/v1.0/image-without-background-base64
curl --request POST \
--url https://api.withoutbg.com/v1.0/image-without-background-base64 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{
"image_base64": "/9j/4AAQSkZJRgABAQAAA..."
}'
Which returns alpha matte as a base64 encoded string.
Binary Image Request & Response
Send raw binary images via POST request and get back a clean, background-removed PNG file instantly. Perfect for direct file processing.
POST/v1.0/image-without-background
curl -X 'POST' \
https://api.withoutbg.com/v1.0/image-without-background \
-H 'X-API-Key: YOUR_API_KEY' \
-F 'file=@input-image.jpg' \
-o output-image.png
Status Codes
Status Code | Description |
---|---|
200 | Success |
401 | Invalid API Key |
402 | Insufficient credit. Please top up API credits. |
403 | Credits Expired. Please top up API credits. |
413 | File size too large. Maximum file size is 10.0 MB |
415 | Unsupported Media Type. Supported formats are: JPEG, PNG, WebP, TIFF, BMP, GIF. |
422 | Input couldn't be validated. |
429 | Rate limit (7 request/minute) exceeded. |
500 | Internal Server Error. Please contact support: contact@withoutbg.com |