BackgroundGone API
Remove image backgrounds programmatically with a simple API call
Quick Start Guide
Get started with BackgroundGone API in minutes. Our API allows you to remove backgrounds from images programmatically with a single API call.
BackgroundGone API uses API keys to authenticate requests. You can view and manage your API keys in your Dashboard.
API Key Authentication
Authorization: Bearer YOUR_API_KEY
import requests
import json
import base64
def remove_background(image_path, api_key):
# Read and encode the image
with open(image_path, "rb") as image_file:
encoded_string = base64.b64encode(image_file.read()).decode("utf-8")
# Prepare the API request
url = "https://api.backgroundgone.com/v1/image-without-background-base64"
headers = {
"Content-Type": "application/json",
"X-API-Key": api_key
}
data = {
"image_base64": encoded_string
}
# Make the API call
response = requests.post(url, headers=headers, json=data)
return response.json()