Skip to main content

Remove Background to Make It Transparent

This API endpoint allows you to remove the background of an image and replace it with transparency. This is especially helpful for isolating subjects, creating stickers, or preparing images for design work.

How It Works

  1. Image Submission: You provide a URL to your input image.
  2. Prompt: Set the background.prompt to "transparent".
  3. Negative Prompt (Optional): For transparent backgrounds, the negative_prompt field should be left empty ("").
  4. Processing: Our AI algorithms analyze your image and intelligently remove the background, making it transparent.
  5. Output: You receive a response containing a URL to your processed image.

API Call Example:

curl --location 'https://api.katalis.ai/service/v1/generate-image' \
--data '{
"image_url": "https://image.url.com",
"background": {
"prompt": "transparent",
"negative_prompt": ""
},
}'

Explanation:

  • "image_url": The URL of the image you want to modify.
  • "background": An object containing the following:
  • "prompt": fill with transparent value make sure without typo.
  • "negative_prompt": parameter is not applicable for remove backgrounds.

API Response:

{
"message": "Success",
"data": {
"img_url": "https://storage.googleapis.com/katalis-ai/image/generated/1/1713944425-2290.png"
}
}

Response Fields:

  • "message": Indicates the status of the request (e.g., "Success").
  • "data": Contains the generated image URL:
  • "img_url": A URL pointing to the newly generated image with the replaced background.

Before & After Example:

Original Image:

original

Prompt: "transparent"

Removed Background Image:

transparent