background-removal
Skill36 starsChanged 9 months agoMITView on GitHub
Remove backgrounds from images using each::sense AI. Isolate subjects with clean edges, create transparent PNGs, replace backgrounds, and generate cutouts for products, portraits, and composites. Powered by eachlabs-bg-remover-v1 for precise edge detection. Use for: e-commerce product photos, portrait backgrounds, social media, photo compositing, transparent assets, marketing materials. Triggers: remove background, background removal, transparent background, cutout, bg remove, background eraser, isolate subject, transparent png, background swap, remove bg, no background
- Reads credentials
- Sends data out
2 other projects use a version of this.
Adopted by
Most recently taken up by
- nikunj812/claude-skilltheir own version, first seen Jul 1, 2026
- eachlabs/skillstheir own version, first seen Apr 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- eachlabs/skills★ 38same name
- nikunj812/claude-skill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- background-removalSkill
- face-swapSkill
- image-editingSkill
- image-generationSkill
- image-upscalingSkill
- lyrics-generationSkill
- music-generationSkill
- song-generationSkill
- sound-effectsSkill
- speech-to-textSkill
- text-to-speechSkill
- video-editingSkill
- video-generationSkill
- voice-generationSkill
- face-swapSkill
- image-editingSkill
- image-generationSkill
- image-upscalingSkill
- lyrics-generationSkill
- music-generationSkill
- song-generationSkill
- sound-effectsSkill
- speech-to-textSkill
- text-to-speechSkill
- video-editingSkill
- video-generationSkill
- voice-generationSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Remove backgrounds from images with pixel-perfect edge detection using each::sense — the intelligent AI agent that automatically selects …
- Distinctive: line 258
Expecting color-matched composites automatically: When replacing backgrounds, always mention "match the lighting" for natural results.
- Distinctive: line 259
Ignoring hair/fur edges: Default removal may hard-cut fine details.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Background Removal
Remove backgrounds from images with pixel-perfect edge detection using each::sense — the intelligent AI agent that automatically selects the best model for your request.
Quick Start
Requires an each::labs API key. Get one at eachlabs.ai.
Using curl
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Remove the background from this image completely. Return the subject on a transparent background with clean edges."},
{"type": "image_url", "image_url": {"url": "https://example.com/product-photo.jpg"}}
]
}
],
"stream": false
}'Using Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="YOUR_EACHLABS_API_KEY",
base_url="https://eachsense-agent.core.eachlabs.run/v1"
)
response = client.chat.completions.create(
model="eachsense/beta",
messages=[{"role": "user", "content": "Remove the background from this image completely. Return the subject on a transparent background with clean edges."}],
# Images are included in the message content array above
)
print(response.choices[0].message.content)With Reference Image
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Remove the background from the first image and place the subject onto the scene shown in the second image. Match lighting and scale naturally."},
{"type": "image_url", "image_url": {"url": "https://example.com/person.jpg"}},
{"type": "image_url", "image_url": {"url": "https://example.com/new-background.jpg"}}
]
}
],
"stream": false
}'Images are sent inside messages using the OpenAI multimodal content format. Maximum 4 images per request.
Streaming
Set "stream": true for real-time SSE responses, or "stream": false for complete result in a single response. Streaming is useful for showing progress in UIs; non-streaming is simpler for scripts and automation.
Available Models
| Model | Strengths | Best For |
| eachlabs-bg-remover-v1 | Precise edge detection, hair/fur handling, transparent output | Clean cutouts, product photos, portraits |
| flux-2-edit | Background replacement with natural language | Swapping to specific new backgrounds |
| flux-fill-pro | Inpainting after removal | Filling background areas with new content |
each::sense selects eachlabs-bg-remover-v1 for pure removal tasks and flux-2-edit when replacement is requested.
Use Cases
| Use Case | Instruction | Output |
| Transparent PNG | "Remove the background completely" | Subject on transparent background |
| White Background | "Remove background, replace with pure white" | Clean e-commerce listing |
| Solid Color | "Replace background with brand blue (#2563EB)" | Branded marketing asset |
| Gradient | "Replace with a soft gray-to-white gradient" | Professional portrait |
| Environment Swap | "Place on a tropical beach at sunset" | Lifestyle composite |
| Studio Backdrop | "Replace with a seamless gray studio backdrop" | Professional product shot |
Prompt Tips
For Clean Removal
"Remove the background completely. Keep edges sharp and clean,
especially around hair and fine details. Transparent background."For Background Replacement
"Remove the current background and replace it with [description].
Match the lighting direction from the original photo.
Keep a natural contact shadow beneath the subject."Shadow Handling
Control how shadows are treated:
"Remove background but keep the natural shadow beneath the product"
"Remove background and all shadows for a clean cutout"
"Remove background, add a soft artificial drop shadow on white"Edge Quality
Request specific edge treatment:
"Ensure hair edges are soft and natural, not hard-cut"
"Keep crisp edges around the product with no background bleed"
"Apply a very slight feather on the edges for smooth compositing"Examples
E-commerce Product Cutout
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Remove the background from this product photo and replace it with a pure white (#FFFFFF) background. Keep a soft, natural drop shadow beneath the product for a floating effect. Crisp edges with no background artifacts."},
{"type": "image_url", "image_url": {"url": "https://example.com/sneaker-on-table.jpg"}}
]
}
],
"stream": false
}'Professional Portrait
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Remove the background from this portrait photo. Replace with a smooth, soft-focus dark gray gradient that is lighter in the center. Keep hair edges natural and wispy, not hard-cut. Professional headshot quality."},
{"type": "image_url", "image_url": {"url": "https://example.com/office-portrait.jpg"}}
]
}
],
"stream": false
}'Transparent Asset for Design
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Remove the background from this image entirely. Output a transparent PNG with no background at all. Clean edges suitable for layering in a design tool like Figma or Photoshop. Remove all shadows."},
{"type": "image_url", "image_url": {"url": "https://example.com/plant-photo.jpg"}}
]
}
],
"stream": false
}'Lifestyle Composite
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Remove the background and place this person on a sunlit rooftop terrace overlooking a Mediterranean coastal city. Match the warm afternoon lighting from the original photo. The person should look naturally placed in the scene with correct scale and perspective."},
{"type": "image_url", "image_url": {"url": "https://example.com/standing-person.jpg"}}
]
}
],
"stream": false
}'Social Media Branded Post
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Remove the background from this photo and replace it with a bold coral-to-magenta gradient going from bottom-left to top-right. Keep the subject sharp with clean edges. This is for an Instagram post, so make it vibrant and eye-catching."},
{"type": "image_url", "image_url": {"url": "https://example.com/influencer-photo.jpg"}}
]
}
],
"stream": false
}'Batch Processing
# Remove backgrounds from multiple product photos
PRODUCTS=(
"https://example.com/product-1.jpg"
"https://example.com/product-2.jpg"
"https://example.com/product-3.jpg"
"https://example.com/product-4.jpg"
)
for URL in "${PRODUCTS[@]}"; do
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d "{
\"messages\": [{\"role\": \"user\", \"content\": \"Remove the background. Replace with pure white. Keep a soft natural shadow. Clean product cutout.\"}],
\"image_urls\": [\"$URL\"],
\"stream\": false
}"
echo "---"
doneSubject Types and Tips
| Subject | Challenge | Tip |
| People (hair) | Fine hair strands | "Keep hair edges soft and natural" |
| Pets (fur) | Fluffy edges | "Preserve fur detail around edges" |
| Products (hard edges) | Reflections, shadows | "Crisp edges, handle reflections" |
| Plants (leaves) | Complex silhouettes | "Preserve leaf detail and gaps" |
| Transparent objects | Glass, bottles | "Handle transparent/translucent areas" |
| Complex scenes | Multiple subjects | "Isolate only the main subject in the center" |
Common Pitfalls
- Not specifying what to keep: "Remove background" is good; "Remove the background but keep the table the product sits on" is better when needed.
- Expecting color-matched composites automatically: When replacing backgrounds, always mention "match the lighting" for natural results.
- Ignoring hair/fur edges: Default removal may hard-cut fine details. Explicitly request "soft, natural hair edges."
- No shadow instructions: The model may keep or remove shadows unpredictably. State your preference.
- Very busy backgrounds with colors similar to the subject are harder. Higher contrast between subject and background produces cleaner results.
Related Skills
- Image Editing — General edits after background removal
- Image Upscaling — Enhance resolution of cutouts
- Face Swap — Replace faces in composited images
- Image Generation — Generate new backgrounds to composite onto
Documentation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

