Remove Product Background

Remove the background from a product photo using AI-powered segmentation.

Who this is for

E-commerce teams remove backgrounds from product photos for clean white-background listings or transparent PNGs for compositing. Upload a raw product photo, remove the background with AI-powered segmentation, and convert to PNG — ready for your storefront or design tool.

Request
curl -X POST https://api.iterationlayer.com/image-transformation/v1/transform \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": {
      "type": "url",
      "name": "product-photo.jpg",
      "url": "https://example.com/product-photo.jpg"
    },
    "operations": [
      { "type": "remove_background", "background_hex_color": "#FFFFFF" },
      { "type": "convert", "format": "png" }
    ]
  }'
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUgAA...",
    "mime_type": "image/png"
  }
}
Request
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });

const result = await client.transform({
  file: {
    type: "url",
    name: "product-photo.jpg",
    url: "https://example.com/product-photo.jpg",
  },
  operations: [
    { type: "remove_background", background_hex_color: "#FFFFFF" },
    { type: "convert", format: "png" },
  ],
});

const imageBuffer = Buffer.from(result.data.buffer, "base64");
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUgAA...",
    "mime_type": "image/png"
  }
}
Request
import base64

from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")

result = client.transform(
    file={
        "type": "url",
        "name": "product-photo.jpg",
        "url": "https://example.com/product-photo.jpg",
    },
    operations=[
        {"type": "remove_background", "background_hex_color": "#FFFFFF"},
        {"type": "convert", "format": "png"},
    ],
)

with open("result.png", "wb") as f:
    f.write(base64.b64decode(result["data"]["buffer"]))
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUgAA...",
    "mime_type": "image/png"
  }
}
Request
package main

import il "github.com/iterationlayer/sdk-go"

client := il.NewClient("YOUR_API_KEY")

result, err := client.Transform(il.TransformRequest{
    File: il.NewFileFromURL("product-photo.jpg", "https://example.com/product-photo.jpg"),
    Operations: []il.TransformOperation{
        {Type: "remove_background", BackgroundHexColor: "#FFFFFF"},
        il.NewConvertOperation("png"),
    },
})
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUgAA...",
    "mime_type": "image/png"
  }
}

Related Recipes

Start building in minutes

Free trial credits included. No credit card required.