rembg Eduza Service API
HTTP API for removing image backgrounds with the Python rembg library.
The service exposes one background-removal endpoint:
GET /remove?url=...removes the background from an image URL.POST /removeremoves the background from raw image bytes in the request body.
All /remove requests require the X-API-Key header.
Authentication
Send the API key with every /remove request:
X-API-Key: your-token
Invalid or missing keys return 403 Unauthorized access.
Remove Background From URL
Use GET /remove with a URL-encoded url query parameter:
curl \
-H "X-API-Key: test" \
"https://rembg.eduza.net/remove?url=https://example.com/image.png" \
--output output.png
The url must use http or https.
Successful responses return image/png.
Python example:
import requests
response = requests.get(
"https://rembg.eduza.net/remove",
headers={"X-API-Key": "test"},
params={"url": "https://example.com/image.png"},
timeout=60,
)
response.raise_for_status()
with open("output.png", "wb") as file:
file.write(response.content)
Remove Background From Uploaded Bytes
Use POST /remove with raw image bytes in the request body:
curl \
-X POST \
-H "X-API-Key: test" \
--data-binary "@input.png" \
https://rembg.eduza.net/remove \
--output output.png
Successful responses return image/png.
Python example:
import requests
with open("input.png", "rb") as input_file:
response = requests.post(
"https://rembg.eduza.net/remove",
headers={"X-API-Key": "test"},
data=input_file,
timeout=60,
)
response.raise_for_status()
with open("output.png", "wb") as output_file:
output_file.write(response.content)
Error Responses
Common errors:
400 Missing image URLwhenGET /removehas nourlparameter.400 Image URL must use HTTP or HTTPSwhen the URL uses another scheme.400 Could not download imagewhen the remote image request fails.400 Missing image datawhenPOST /removehas an empty body.403 Unauthorized accesswhenX-API-Keyis missing or invalid.
Machine-Readable Documentation
The app serves this documentation at:
- / as rendered HTML
- /llms.txt as markdown