DeerAPI Plus icon

DeerAPI Plus

AI 全能工具箱:对话、思维链、图片、视频、向量、提示词优化、虚拟试穿 | AI Toolkit: Chat, Thinking, Image, Video, Embeddings, Prompt, Virtual Try-On

Actions11

🖼️ 图片 / Image → 移除背景 / Remove Background

AI-generated

Summary

Removes the background from an image using a Gemini vision model and returns the result as a URL or binary data.

Inputs

  • resource (required) — Must be set to 'image' for this operation.
  • operation (required) — Must be set to 'removeBackground'.
  • model (required) — Model to use for background removal. Choose from the provided options or specify a custom model ID when 'Custom' is selected.
  • customModel — Custom model ID when 'model' is set to '__custom'.
  • inputMethod — How to provide the input image: 'url' (default) or 'binary'.
  • imageUrl — URL of the image to process. Required when 'inputMethod' is 'url'.
  • binaryProperty — Name of the binary property containing the image data. Required when 'inputMethod' is 'binary'. Defaults to 'data'.
  • additionalOptions — Collection of optional settings for the background removal operation.

Output shape

object

The operation returns an array with a single object containing a 'json' field and, optionally, a 'binary' field when outputType is 'binary'.

Examples

Example 1: Remove background from a publicly accessible image URL and receive the result as a URL.

Set resource to 'image', operation to 'removeBackground', model to 'Gemini 2.5 Flash Image', inputMethod to 'URL', provide imageUrl, and keep additionalOptions at defaults.

Example 2: Remove background from an image stored in a previous node's binary data, output as binary with a white background.

Set resource to 'image', operation to 'removeBackground', model to a suitable Gemini model, inputMethod to 'Binary Data', binaryProperty to the name of the binary containing the image, set backgroundColor to 'White' in additionalOptions, and set outputType to 'Binary'.

Links

Discussion