Clean Assets in Under 2 Seconds
Send a raw photo to the API and receive a transparent PNG in under 2 seconds on average. Drop it directly into your Canva template, or social scheduling tool. No manual selection, no masking, no cleanup step.
Publish cleaner assets faster across Instagram, TikTok, and YouTube Shorts with API-driven background removal built for high-volume content teams.
Social media content moves fast. A creator or brand team publishing daily to Instagram, TikTok, and YouTube Shorts needs a constant stream of clean, professional-looking images. Backgrounds from phone cameras, home offices, and outdoor shoots are inconsistent — mismatched lighting, cluttered spaces, and random environments make content look unprofessional even when the subject is great.
Manual background removal for a single image in Canva takes anywhere from 30 seconds to 5 minutes depending on complexity. Multiply that across 20–50 images per week for an active account and it becomes a meaningful time sink that slows publishing cadence. Agencies managing multiple client accounts face this at even greater scale.
The solution is to move background removal out of manual tools and into an automated pipeline. Upload the raw image, call the API, get a clean PNG back — then drop it into your design tool, template, or CMS. The creative work stays human. The cleanup becomes automatic.
Send a raw photo to the API and receive a transparent PNG in under 2 seconds on average. Drop it directly into your Canva template, or social scheduling tool. No manual selection, no masking, no cleanup step.
Beyond transparent output, FapiHub includes endpoints for solid color fills, gradient backgrounds, and blur effects. Create a branded color background for Instagram posts, a gradient for stories, and a blurred depth-of-field version for LinkedIn — all from one image with three API calls.
Whether you are processing 100 images for a product launch or 5,000 for a quarterly campaign, pricing stays flat at $0.001/image. No tiered pricing, no surprise overages, no minimum spend between campaigns.
This Node.js example processes a folder of raw social media photos and outputs branded gradient-background versions ready to post.
const fs = require("fs");
const path = require("path");
const FormData = require("form-data");
const fetch = require("node-fetch");
const API_KEY = "YOUR_API_KEY";
const INPUT_DIR = "./raw_photos";
const OUTPUT_DIR = "./processed";
if (!fs.existsSync(OUTPUT_DIR)) fs.mkdirSync(OUTPUT_DIR);
async function processImage(filePath) {
const form = new FormData();
form.append("image", fs.createReadStream(filePath));
form.append("top_color", "255,100,50");
form.append("bottom_color", "255,200,100");
const response = await fetch("https://fapihub.com/v2/rembg/gradient/", {
method: "POST",
headers: { token: API_KEY, ...form.getHeaders() },
body: form,
});
if (!response.ok) {
console.error(`Error on ${path.basename(filePath)}: ${response.status}`);
return;
}
const buffer = await response.buffer();
const outPath = path.join(OUTPUT_DIR, path.basename(filePath, path.extname(filePath)) + ".png");
fs.writeFileSync(outPath, buffer);
console.log(`Done: ${path.basename(filePath)}`);
}
const files = fs.readdirSync(INPUT_DIR).filter(f => /\.(jpg|jpeg|png|webp)$/i.test(f));
console.log(`Processing ${files.length} images...`);
Promise.all(files.map(f => processImage(path.join(INPUT_DIR, f))));