BackgroundCut API v1
The power of BackgroundCut, automated
$ curl -H 'Authorization: Token YOUR_API_KEY' \
-F 'file=@/your/image/file.jpg' \
https://backgroundcut.co/api/v1/cut/Sample Code Examples
import requests
url = "https://backgroundcut.co/api/v1/cut/"
headers = {
"Authorization": "Token YOUR_API_KEY"
}
with open("/path/to/your/image.jpg", "rb") as file:
files = {"file": file}
response = requests.post(url, headers=headers, files=files)
if response.status_code == 200:
with open("output.png", "wb") as output_file:
output_file.write(response.content)
print("Background removed successfully!")
else:
print(f"Error: {response.status_code} - {response.text}")API Reference
Endpoint
| API Endpoint | https://backgroundcut.co/api/v1/cut/ |
| Method | POST |
Authentication
| Authorization | Token YOUR_API_KEY |
Parameters
| file | Source image file. Supports PNG, JPG, JPEG, WEBP formats. Maximum file size: 12MB |
| max_resolution | Maximum output resolution in pixels. Up to 25,000,000 pixels (25MP). Example: 4000000 for 4MP output. |
| return_format | 'PNG' (default), 'WEBP' (recommended). |
| quality | 'High', 'Medium' (default), 'Low'. Higher quality takes more processing time. |
Response Codes
| 200 | Successfully removed image background |
| 400 | Invalid parameters or unable to process input image file |
| 401 | API-KEY missing or invalid API-KEY |
| 402 | No credits remaining |
| 405 | Invalid request method (ensure POST is used) |
| 413 | File size exceeds 12MB limit |
| 429 | API rate limit exceeded |
API Rate Limit
The BackgroundCut API has fixed rate limits based on your subscription plan:
- Basic Plan: 100 requests per minute
- Plus API Plan: 200 requests per minute
- Professional API Plan: 200 requests per minute
These are flat rates that provide consistent and predictable performance for your applications. Special increases in the rate limit can be requested for enterprise customers.