Skip to main content
Glama

Remove the background from an image

replicate_remove_background

Remove the background from an image to produce a transparent PNG. Supports models like rembg, birefnet, and briaai-rmbg.

Instructions

Produce a transparent-background version (PNG) of an image.

DISPLAY REQUIREMENT — after this tool returns successfully, embed the cut-out image inline using one of the three blocks (iframe / / markdown) printed by the tool.

Args:

  • image (string URL): URL of the source image.

  • model (string, default "rembg"): Curated key (rembg, birefnet, briaai-rmbg) or "owner/name".

  • extra_input (object, optional): Model-specific extras.

  • download (boolean, default true): Download the cut-out PNG locally.

Returns: PredictionResult with urls + local_paths to a transparent PNG.

Examples:

  • image="" → rembg quick cut

  • image="", model="birefnet" → sharper edge for hair

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesURL of the image whose background to remove.
modelNoBackground remover. Curated: rembg, birefnet, briaai-rmbg. Or "owner/name".rembg
downloadNo
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).
extra_inputNo
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false and openWorldHint=true. Description adds that the output is a PNG and notes local download, but does not elaborate on timeout behavior (though mentioned in schema), side effects, or rate limits. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose stated first, followed by a crucial display requirement, then concise parameter list, return type, and examples. No unnecessary words; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Examples and return type help, but no output schema exists and description doesn't detail the PredictionResult structure or error scenarios. For a tool with 5 params and nested objects, more detail would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Description explains image, model (curated keys vs custom), extra_input, and download meaningfully. However, it omits the timeout_ms parameter. With 60% schema coverage, the description adds value for most parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool produces a transparent-background PNG, with examples differentiating from siblings like replicate_generate_image or replicate_inpaint. The title also reinforces the specific function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit display instructions for embedding the result, but does not specify when to use this tool versus alternatives like replicate_segment or replicate_inpaint. No prerequisites or exclusions are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sena-labs/replicate-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server