remove-bg
FreeNo executable scriptsNot checkedRemove image backgrounds with remove.bg's background removal, now served by the Leonardo.Ai API. Trigger phrases: remove.bg, remove background, cutout image.
by gabrielmoreira★ 23 GitHub starsAbout this skill
remove.bg
Purpose
Remove the background from an image: submit a local file or an image URL, get back a transparent PNG saved to a local path. Starting December 1, 2026 the remove.bg API moves to Leonardo.Ai, so this connector calls Leonardo's sync API with the remove-bg model, following the official migration guide.
Tooling
All commands go through bin/remove-bg.py:
bin/remove-bg.py auth # verify the connection
bin/remove-bg.py process --file ./photo.jpg --out ./cutout.png
# remove background from a local file
bin/remove-bg.py process --url https://example.com/a.jpg --out ./cutout.png
# remove background from an HTTPS image URL
bin/remove-bg.py process --file ./photo.jpg --out ./cutout.png --size full --type product
# size: preview, full, auto, 50MP; type: auto, person, product, car, animal, graphic, transportation, other
process requests the result inline (base64: true) with ephemeral: true, so nothing is kept in the Leonardo library. The CLI decodes the image, saves it to the --out path and prints that path plus the cost Leonardo reports for the call.
Auth
- Provider id:
remove-bg(credential is collected ascustom.remove-bg) - Collection: a Leonardo.Ai API key via the secure credential flow (
credentials.request_api_access); create one on the API Access page at app.leonardo.ai. The key is sent asAuthorization: Bearer YOUR_API_KEY. remove.bg keys don't carry over: ifcustom.remove-bgstill holds an old remove.bg key, reconnect it with a Leonardo.Ai key. - Required scopes: n/a (single key)
- Allowed hosts:
cloud.leonardo.ai - Status check:
bin/remove-bg.py auth(lists the available models, which costs nothing)
Operating Rules
- Every
processcall is billed (USD $0.1047 per image per Leonardo's migration guide; the exactcostis printed after each call): confirm with the user before processing, or work inside an explicit budget. - Uploaded images are processed on Leonardo.Ai's servers: do not send sensitive or private imagery without the user's okay.
- Inline limits: local files are sent as base64 and should stay under ~7.5MB, and inline results must stay under ~7.45MB. For big images use
--size previewor pass an HTTPS--url. - There is no credit balance command: Leonardo's documented API has no equivalent of remove.bg's
/account. - No video support (video background removal is a separate service).
- Never exfiltrate the credential: the CLI only ever handles surrogates. Do not print, log, or transmit the key value.
Files
- SKILL.md
- bin/remove-bg.py
Maturity
🧪 Draft: written from Leonardo.Ai's public remove.bg migration guide (updated 2026-09-02) and Create Sync Generation reference (updated 2026-08-31); not yet live-tested end to end.
Install remove-bg in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the remove-bg skill do?
Remove image backgrounds with remove.bg's background removal, now served by the Leonardo.Ai API. Trigger phrases: remove.bg, remove background, cutout image.
How do I install the remove-bg skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the remove-bg skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic