removebg

Remove background from your images instantly

Drag and drop images here or click to upload

Support for multiple images (JPG, PNG, WEBP)

No image? Try one of these samples

Background Remover API

Easily remove image backgrounds using our API Made Using rembg

How to Use the API

1. Remove Background

Upload a single or multiple images to remove the background:

POST /remove-bg
Content-Type: multipart/form-data
Body: 
- images: One or more image files
            

Node.js Request Example

Here's how to make a request to the API using Node.js:

const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');

async function removeBackground() {
  const form = new FormData();
  form.append('images', fs.createReadStream('path/to/your/image.jpg'));

  try {
    const response = await axios.post('https://remove-bg-rv88.onrender.com/remove-bg', form, {
      headers: {
        ...form.getHeaders()
      },
      responseType: 'arraybuffer'
    });

    fs.writeFileSync('output.png', response.data);
    console.log('Background removed successfully! File saved as output.png');
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

removeBackground();