4K AI Image Upscaler & Background Remover Skill
Use the hosted Apify Actor futurewood/ai-image-upscaler-bg-remover to upscale images to 4K, cut out transparent PNGs, or generate pure-white (#FFFFFF) studio product photos in batches of up to 100 images per call.
Prerequisites & Cost Guardrails
- Authentication: Requires an
APIFY_TOKENenvironment variable (every Apify account includes free monthly credits —$5/monthon Starter/Creator). IfAPIFY_TOKENis not set, direct the user to create a free token athttps://console.apify.com/settings/integrationsor connect viahttps://mcp.apify.com?tools=futurewood/ai-image-upscaler-bg-remover. - Predictable Pay-Per-Event Pricing (all Apify RAM/CPU compute included;
$0.00on failed or smart-skipped URLs):upscale_crisp(image-upscaled):$0.011 – $0.015 / imageremove_background(background-removed):$0.011 – $0.015 / imageecommerce_studio(ecommerce-studio-combo):$0.018 – $0.025 / image
- Pre-Run Cost Estimate & Spend Cap:
- Before running batches larger than 20 images, state the estimated cost (
count × $0.015orcount × $0.025) and pass?maxTotalChargeUsd=<cap>on the API request so spend is strictly bounded.
- Before running batches larger than 20 images, state the estimated cost (
Option A: Call via Synchronous REST API (curl / fetch / Python)
For batches up to ~20 images (completes in 5–30 seconds), call run-sync-get-dataset-items directly:
curl -sS -X POST "https://api.apify.com/v2/acts/futurewood~ai-image-upscaler-bg-remover/run-sync-get-dataset-items?token=${APIFY_TOKEN}&maxTotalChargeUsd=2.50" \
-H "Content-Type: application/json" \
-d '{
"imageUrls": [
"https://example.com/product-1.jpg",
"https://example.com/product-2.webp"
],
"mode": "ecommerce_studio",
"backgroundStyle": "white",
"paddingPercent": 5,
"outputFormat": "png",
"maxConcurrency": 3
}'
Local Files (No Public URL Needed)
If the user points to local image files (./photos/*.jpg), encode each file (< 25 MB) as a data:image/<ext>;base64,... string inside imageUrls:
import base64, json, os, pathlib, urllib.request
token = os.environ["APIFY_TOKEN"]
files = sorted(pathlib.Path("./photos").glob("*.jpg"))[:50]
data_uris = [
f"data:image/jpeg;base64,{base64.b64encode(p.read_bytes()).decode()}"
for p in files
]
payload = {
"imageUrls": data_uris,
"mode": "ecommerce_studio",
"backgroundStyle": "white",
"paddingPercent": 5,
"outputFormat": "png",
}
req = urllib.request.Request(
f"https://api.apify.com/v2/acts/futurewood~ai-image-upscaler-bg-remover/run-sync-get-dataset-items?token={token}&maxTotalChargeUsd=2.00",
data=json.dumps(payload).encode(),
method="POST",
headers={"Content-Type": "application/json"},
)
items = json.loads(urllib.request.urlopen(req, timeout=300).read().decode())
for src_path, item in zip(files, items):
if item.get("status") == "succeeded" and item.get("outputUrl"):
out_bytes = urllib.request.urlopen(item["outputUrl"]).read()
out_file = src_path.with_name(f"{src_path.stem}_4k_studio.png")
out_file.write_bytes(out_bytes)
print("Saved:", out_file, item["outputDimensions"])
Option B: Connect via Apify Hosted MCP Server
Add to Claude Code, Cursor, or VS Code:
claude mcp add --transport http apify-image-studio \
"https://mcp.apify.com?tools=futurewood/ai-image-upscaler-bg-remover" \
--header "Authorization: Bearer ${APIFY_TOKEN}"
Choosing the Right Mode & Parameters
| User Goal | mode | backgroundStyle | Extra Parameters |
|---|---|---|---|
| Amazon / Walmart / Shopify white-BG main image | ecommerce_studio | white | paddingPercent: 5, outputFormat: "png" or "webp" |
| Transparent logo, sticker, or apparel cutout | remove_background | transparent | outputFormat: "png" |
| Headshot, fashion model, or flyaway hair/fur | remove_background | transparent | bgModelVariant: "Matting" |
| Enlarge Midjourney / Flux / POD design to 4K | upscale_crisp | white (ignored) | upscaleEngine: "recraft_crisp" |
| Process Google Sheet or CSV catalog | ecommerce_studio | white | spreadsheetUrl: "...", keepFields: ["sku", "title"] |
| Scheduled run skipping already-4K images | upscale_crisp | — | skipIfLongEdgeAtLeast: 2048 ($0.00 on skipped) |