Skip to main content
Glama

Remove background

removeBackground

Remove the background from a single image, returning the subject isolated on a transparent background. Supply the source image (URL or base64); optionally set crop to trim the result to the content, and creative_edit (default true) for higher-quality output that may not match the input pixel-for-pixel - set it false when the subject must stay pixel-identical, e.g. an existing sprite you will animate. The job result is a single image result with a url (not an array). The image is uploaded and validated, and an image larger than 15MB is rejected with HTTP 400. Credits are held when the job is accepted and refunded if it fails or is cancelled. Use removeBackground for this dedicated cutout task; editImage can also remove backgrounds via a prompt but is better for broader edits, while createImage and generateWithStyle produce new images rather than process an existing one. Pass an optional request_id to tag the result so you can retrieve it later via listGenerations (type image). Async generation job: returns {id, status} - poll getApiJob (job and credit contract: see the server instructions).

Credits: This endpoint consumes 0.5 credits per result.

Input Schema

NameRequiredDescriptionDefault
requestBodyYesPayload for removing the background of an image

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable as the request_id filter of listGenerations."
  2. Changed4 schema fields changed
    • removedInput schema / properties / requestBody / properties / creative_edit / default
      Removed value: -true
    • changedInput schema / properties / requestBody / properties / creative_edit / description
      Previous value: -"Higher quality results but the image will not be exactly the same as the input."New value: +"Higher quality results but the image will not be exactly the same as the input. Default: true."
    • removedInput schema / properties / requestBody / properties / crop / default
      Removed value: -false
    • changedInput schema / properties / requestBody / properties / crop / description
      Previous value: -"Whether to crop/trim the result to fit the content."New value: +"Whether to crop/trim the result to fit the content. Default: false."
  3. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."
  4. Changed1 schema field changed
    • addedInput schema / properties / requestBody / properties / request_id
      Added value: +{
      +  "description": "Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint.",
      +  "type": "string"
      +}
  5. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses the async job contract, polling via getApiJob, the single-image result shape, the 15MB upload rejection, and credit hold/refund behavior. It also warns that creative_edit may not preserve pixel identity, which is important behavioral context not covered by annotations.

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?

The purpose and return shape are front-loaded, followed by parameter guidance, sibling alternatives, and async/credit details. Despite being dense, every sentence supports correct selection or invocation of this asynchronous generation tool.

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

Completeness5/5

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

For an async image-processing job with no output schema, the description covers the result shape, polling destination, upload limit, credit behavior, and sibling alternatives. An agent has enough information to invoke it and handle the returned job correctly.

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?

Schema coverage is 100%, so the schema already defines all parameters. The description adds meaningful context beyond the schema, especially the sprite-animation reason to set creative_edit=false and the request_id retrieval path via listGenerations.

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 gives a specific verb and resource: remove the background from a single image and return the isolated subject on transparency. It explicitly distinguishes this from editImage, createImage, and generateWithStyle, so an agent can select it without opening sibling schemas.

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

Usage Guidelines5/5

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

It states exactly when to use this tool for a dedicated cutout, when editImage is better, and why createImage/generateWithStyle are alternatives rather than substitutes. It also gives concrete guidance on crop and creative_edit, including the pixel-identical sprite case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.