E-commerce marketplaces require consistent product presentation. White or transparent backgrounds are often mandatory, but manual editing can delay listing workflows.
Automation architecture
- Capture product photo
- Upload to storage
- Trigger API background removal
- Store final PNG and sync to CMS/marketplace
Why API automation wins
- Faster listing turnaround
- Consistent visual quality
- Predictable cost per image
The real cost of manual background removal
At $1–3 per image outsourced to a freelance retoucher, a catalog of 500 SKUs with 4 images each costs $2,000–6,000 before a single product goes live. In-house editing at 5 minutes per image is 167 hours of work for the same catalog. Neither approach scales. When a new product line launches or seasonal inventory changes, the entire cost resets.
Setting up the automation pipeline
The simplest production setup uses three components: a watched folder (local, Dropbox, or S3), a processing script that calls the API, and an output folder where cleaned images land. Your existing CMS or marketplace upload tool picks up from the output folder. No change to the existing publishing workflow.
import requests
import time
from pathlib import Path
API_KEY = "YOUR_API_KEY"
INPUT_DIR = Path("raw_products")
OUTPUT_DIR = Path("processed_products")
OUTPUT_DIR.mkdir(exist_ok=True)
def process_image(path: Path) -> bool:
with open(path, "rb") as f:
response = requests.post(
"https://fapihub.com/v2/rembg/",
headers={"ApiKey": API_KEY},
files={"image": f},
timeout=30,
)
if response.status_code == 200:
out = OUTPUT_DIR / (path.stem + "_nobg.png")
out.write_bytes(response.content)
print(f" ✓ {path.name}")
return True
elif response.status_code == 429:
print(" Rate limit hit, waiting...")
time.sleep(5)
return process_image(path)
else:
print(f" ✗ {path.name} — HTTP {response.status_code}")
return False
images = list(INPUT_DIR.glob("*.jpg")) + list(INPUT_DIR.glob("*.png"))
print(f"Processing {len(images)} product images...")
results = [process_image(img) for img in images]
print(f"
Complete: {sum(results)}/{len(images)} succeeded")Getting Amazon-ready white backgrounds
Amazon requires pure white (#FFFFFF) main product image backgrounds. Instead of the transparent removal endpoint, use the color endpoint with background_color set to 255,255,255:
response = requests.post(
"https://fapihub.com/v2/rembg/color/",
headers={"ApiKey": API_KEY},
files={"image": open("product.jpg", "rb")},
data={"background_color": "255,255,255"},
timeout=30,
)Pricing at e-commerce scale
At $0.002/image on FapiHub, processing 10,000 images per month costs $20. The same volume on PhotoRoom Basic costs $200. On remove.bg it costs over $1,000. For a business that treats product photography as a recurring operational cost, the difference compounds every month.
| Volume | FapiHub | PhotoRoom | remove.bg |
|---|---|---|---|
| 1,000 images | $2.14 | $20 | $105 |
| 10,000 images | $20 | $200 | $1,052 |
| 50,000 images | $79 | $1,000 | $5,260 |
Pricing impact
At 50,000 images, small per-image differences become material. A lower-cost API directly improves margin on each SKU published.
With FAPIhub pricing at $0.00214/image, teams can scale image operations without committing to expensive annual plans.