# Background Removal

This script utilizes the ApexPainter class from the apexify.js library to remove background from an image.

# Usage

To remove background from an image, follow these steps:

1.Import the ApexPainter class from the apexify.js library:

const { ApexPainter } = require('apexify.js'); 
import { ApexPainter } from 'apexify.js'; 

2.Create an instance of the ApexPainter class:

const painter = new ApexPainter();

3.Call the removeBackground meathod:

  • Provide image url to remove its background
const imageURL = 'https://example.com/image.jpg';
const Api_Key = ""

4.Generate The background Removed Image:

const removingBg = await painter.removeBackground(imageURL, Api_Key);
console.log(removingBg); // Returns a buffer image.

# Background Removal Parameters:

Name Type Required Description
imageURL string True The image url to remove its background.
Api_Key string True The Api Key to use background removal, use background removal to get the key.