Powerful Background Removal API
Integrate our advanced AI-powered background removal technology directly into your applications
Simple Integration
Easy to integrate with any programming language using our RESTful API
Secure Authentication
API key authentication for secure and controlled access
Detailed Documentation
Comprehensive guides and examples to get you started quickly
API Endpoint
POST https://api.rmbg.pro/v1.0.1/remove_background
Authentication
Include your API key in the request headers:
X-API-KEY: your_api_key_here
Open Source Examples
Explore ready-to-run examples for popular frameworks in our public repository.
https://github.com/ch-moez/rmbg.pro-examples/tree/mainCode Examples
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
async function removeBackground() {
try {
const formData = new FormData();
formData.append('image_file', fs.createReadStream('path/to/your/image.jpg'));
formData.append('return_type', 'base64');
// Optional parameters
formData.append('custom_bg_color', '#FFFFFF'); // Custom background color
formData.append('output_format', 'png'); // (e.g., 'webp', 'avif', etc.)
formData.append('custom_bg_image', fs.createReadStream('path/to/background.jpg')); // Custom background image
formData.append('logo', fs.createReadStream('path/to/logo.png')); // Logo to add
formData.append('position_logo', 'center-center'); // Logo position (e.g., 'center-center', 'top-left', etc.)
formData.append('logo_size_percentage', '30'); // Logo size as percentage
const response = await axios.post('https://api.rmbg.pro/v1.0.1/remove_background', formData, {
headers: {
'Content-Type': 'multipart/form-data',
'X-API-KEY': 'YOUR_API_KEY'
}
});
// Save the processed image
fs.writeFileSync('output.png', response.data);
console.log('Background removed successfully!');
} catch (error) {
console.error('Error:', error.message);
}
}
removeBackground();Ready to Get Started?
Create an account now and get your API key to start removing backgrounds programmatically
Sign Up for Free