- Home
- Documentation
- Transparency Mask
Transparency Mask
Provides detailed transparency data. It is great for image compositing, graphical enhancements, and precise background manipulation.
Base64 Request & Response
Get detailed transparency masks via Base64 - send one API request and receive a JSON response with precise alpha channel data.
POST/v1.0/alpha-channel-base64
curl --request POST \
--url https://api.withoutbg.com/v1.0/alpha-channel-base64 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{
"image_base64": "/9j/4AAQSkZJRgABAQAA..."
}'
Which returns alpha matte as a base64 encoded string.
Binary Image Request & Response
Send and receive binary image data directly for efficient processing and storage of alpha channel information.
POST/v1.0/alpha-channel
curl --request POST \
--url https://api.withoutbg.com/v1.0/alpha-channel \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: YOUR_API_KEY' \
--form file=@/input-image.jpg
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 |