Authentication
Include your API key in the request header. Contact me to obtain an API key.
X-API-Key: your_api_key_here
Endpoint
POST
/tech/cutout/api/remove-bg
Remove background from images using AI.
Parameters:
file
Image file (JPEG, PNG, WebP). Max 5MB.
Response:
PNG image with transparent background
Examples
cURL:
curl -X POST https://girste.com/tech/cutout/api/remove-bg \
-H "X-API-Key: your_api_key_here" \
-F "file=@image.jpg" \
-o result.png
Python:
import requests
url = "https://girste.com/tech/cutout/api/remove-bg"
headers = {"X-API-Key": "your_api_key_here"}
files = {"file": open("image.jpg", "rb")}
response = requests.post(url, headers=headers, files=files)
with open("result.png", "wb") as f:
f.write(response.content)
JavaScript:
const formData = new FormData();
formData.append('file', fileInput.files[0]);
const response = await fetch('/tech/cutout/api/remove-bg', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here'
},
body: formData
});
const blob = await response.blob();
const url = URL.createObjectURL(blob);
Rate Limits
Rate limits vary by API key. Your current limit will be communicated when your key is issued.
Error Responses
// 401 Unauthorized - Missing API key
{
"detail": "Missing API key. Include X-API-Key header."
}
// 403 Forbidden - Invalid API key
{
"detail": "Invalid or inactive API key"
}
// 413 Payload Too Large - File too large
{
"detail": "File too large. Maximum size: 5MB"
}
// 429 Too Many Requests - Rate limit exceeded
{
"detail": "Rate limit exceeded"
}