Remove.bg API

⭐ Beginner's Pick Photography / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Remove.bg is an API that automatically removes the background from any photo using AI. You simply send an image and get back a clean, transparent PNG — no manual editing required. It is ideal for product photography, profile pictures, and creative design projects.

💡

Beginner Tip

Start with a small image file (under 1 MB) to keep API credit usage low while testing. The free tier gives you 50 API calls per month with reduced resolution output.

Available Data

image URLs in multiple sizes
photographer credit
image dimensions
download link
color data
Use case: Integrate image background removal data into web and mobile applications

Example Response

JSON Response
{
  "id": "Dwu85P9SOIk",
  "urls": {
    "full": "https://images.unsplash.com/photo-...",
    "regular": "https://images.unsplash.com/photo-...?w=1080",
    "thumb": "https://images.unsplash.com/photo-...?w=200"
  },
  "width": 4000,
  "height": 3000,
  "user": {
    "name": "John Doe",
    "username": "johndoe"
  }
}

Field Reference

data.result_b64 Base64-encoded PNG of the image with the background removed.
data.result_url Temporary URL pointing to the processed image (available for a limited time).
data.foreground_top Top pixel coordinate of the detected foreground subject bounding box.
data.foreground_height Height in pixels of the detected foreground subject.
data.credits_charged Number of API credits consumed by this request.

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://www.remove.bg/api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

HTTP 402 Payment Required You have used all your free API credits for the month.
Check your remaining credits on the remove.bg dashboard and upgrade your plan or wait for the monthly reset.
HTTP 400 Bad Request: image too large The uploaded image exceeds the 12 MB file size limit.
Resize or compress the image before sending it to the API.
HTTP 403 Forbidden The API key is missing, invalid, or not included in the request header.
Make sure you pass the key as the X-Api-Key header, not as a query parameter.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Photography
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →