Savv Pro
  • Welcome
    • FAQ
  • πŸ€–AI Background Remover API
    • πŸš€Quick Start
    • πŸ‘¨β€πŸ’»Status Code
  • πŸ—ΏAI Face Swap API
    • πŸš€Quick Start
    • πŸ‘¨β€πŸ’»Status Code
  • 🍏AI Object Remover API
    • πŸš€Quick Start
    • πŸ‘¨β€πŸ’»Status Code
  • πŸ‘οΈAI Eye Color Changer API
    • πŸš€Quick Start
    • πŸ‘¨β€πŸ’»Status Code
Powered by GitBook
On this page
  • πŸ”‘ Get your API keys
  • Make your first request
  1. AI Background Remover API

Quick Start

PreviousAI Background Remover APINextStatus Code

Last updated 3 months ago

Good to know:

  • Your API key is unique to your account and must be kept secure. Do not share it publicly.

  • If your API key is compromised, you can regenerate a new one from your RapidAPI dashboard.

  • The API supports various image formats such as JPG, PNG, and WebP for background removal.

  • API requests must include the correct headers to ensure authentication and proper content processing.

  • Rate limits may apply based on your subscription tier, so check your usage limits in the RapidAPI dashboard.

πŸ”‘ Get your API keys

Your API requests require authentication using an API key. Any request without a valid API key will return an error.

To get started:

  1. Sign up on and subscribe to the

  2. Obtain your API key from your RapidAPI dashboard.

πŸ“Œ Note: Keep your API key secure and do not share it publicly. If your key is compromised, you can regenerate a new one from the RapidAPI dashboard.

Make your first request

Here’s how you can quickly test the Background Remover API by making a simple request to remove the background from an image:

Good to know:

  • To remove a background from an image, simply upload the image file in the request body. The API processes the image and returns a URL to the edited version.

  • Ensure the request includes the correct headers, including your API key for authentication.

  • Keep an eye on rate limits based on your subscription plan to avoid request failures.

  • In case of errors, check the response message for details on invalid parameters, authentication issues, or unsupported file formats. You could also check status codes.

Take a look at how you might call this method using curl:

const axios = require('axios');

const encodedParams = new URLSearchParams();

const options = {
  method: 'POST',
  url: 'https://remove-background18.p.rapidapi.com/public/remove-background',
  headers: {
    'x-rapidapi-key': '45dd2c909emshc6860efd9bad512p1ba614jsn2ad6c4147afd',
    'x-rapidapi-host': 'remove-background18.p.rapidapi.com',
    'Content-Type': 'application/x-www-form-urlencoded',
    accept: 'application/json'
  },
  data: encodedParams,
};

try {
	const response = await axios.request(options);
	console.log(response.data);
} catch (error) {
	console.error(error);
}
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
	if (this.readyState === this.DONE) {
		console.log(this.responseText);
	}
});

xhr.open('POST', 'https://remove-background18.p.rapidapi.com/public/remove-background');
xhr.setRequestHeader('x-rapidapi-key', '45dd2c909emshc6860efd9bad512p1ba614jsn2ad6c4147afd');
xhr.setRequestHeader('x-rapidapi-host', 'remove-background18.p.rapidapi.com');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader('accept', 'application/json');

xhr.send(data);

import requests

url = "https://remove-background18.p.rapidapi.com/public/remove-background"

payload = {}
headers = {
	"x-rapidapi-key": "45dd2c909emshc6860efd9bad512p1ba614jsn2ad6c4147afd",
	"x-rapidapi-host": "remove-background18.p.rapidapi.com",
	"Content-Type": "application/x-www-form-urlencoded",
	"accept": "application/json"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
πŸ€–
πŸš€
RapidAPI
Background Remover API.