# Remove Background from Images using Rest API

> Dynamically remove background from images via Rest API or integrations. Use background removal directly in Orshot Studio to improve template designs

- **Author**: Rishi Mohan
- **Published**: 2025-07-26
- **Tags**: Templates, Orshot Studio
- **Read time**: 3 min read
- **URL**: https://orshot.com/blog/remove-image-background-api

---

Removing backgrounds from images used to be a tedious manual process requiring expensive software and design skills. Not anymore. Orshot's AI-powered background removal feature can instantly remove backgrounds from any image with just a single click in Studio or API call

This is not available just as a feature but we also have a [**Background Removal Rest API**](https://orshot.com/templates/image-background-removal-api) or automate through integrations

You can also [**play with the template here**](https://orshot.com/templates/image-background-removal-api/generate)

## How to use the Rest API?

**First, [signup on Orshot](https://orshot.com/signup) to get your API key**

Remove backgrounds programmatically with a simple API call:```javascript
const response = await fetch("https://api.orshot.com/v1/generate/image", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    templateId: "image-background-removal-api",
    modifications: {
      inputImage: "https://example.com/your-image.jpg",
      // or use base64: 'data:image/jpeg;base64,/9j/4AAQ...'
    },
    responseType: "url", // or 'base64'
    responseFormat: "webp",
  }),
});

const result = await response.json();
console.log("Background removed:", result.data.content);
```### Input Options

- **Image URL**: Direct link to your image
- **Base64**: Upload image data directly
- **Binary**: Raw image file data
- **Multiple formats**: Supports JPG, PNG, WebP, and more

### Output Options

- **URL**: Get a hosted link to the processed image
- **Base64**: Receive image data for immediate use
- **Binary**: Raw file data for direct processing

## Automate using Integrations

You can use Background Removal API template with various integrations
like n8n, Zapier, Make, Airtable, Pipedream and more

You can view the integrations guides on the [template page here](https://orshot.com/templates/image-background-removal-api)

## Image Background Removal in Orshot Studio

Orshot users can directly use this feature in [Studio](https://orshot.com/studio) to improve their
marketing images. It's useful in many cases be it e-commerce photos,
or creating that perfect design

[![](https://orshot.com/blog/background-removal-studio.png)](/studio)

Here's how you can use it in Orshot Studio

**In the Canvas:**

1. Add an image element to your canvas
2. Select the image element
3. In the Element Editor panel, click the "Remove Background" button
4. Wait for AI processing (usually takes a few seconds)
5. The image background will be removed automatically
6. The processed image is saved to your brand assets

**In the Layer List:**

1. Right-click on any image layer
2. Select "Remove Background" from the context menu
3. The AI will process and update the image instantly

Note that this feature uses your Orshot account's render credits
to process background removal. It basically uses the same
Background Removal API that's mentioned in start of the article