transform-remove-background-with-transloadit
Original:🇺🇸 English
Translated
One-off background removal (local image -> transparent PNG) using the official `@transloadit/node` CLI. Use a minimal `/image/bgremove` steps JSON and download the result to an explicit `.png` path via `-o`.
7installs
Sourcetransloadit/skills
Added on
NPX Install
npx skill4agent add transloadit/skills transform-remove-background-with-transloaditTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Inputs
- Absolute path to a local input image
- Optional output path; default to an explicit sibling
.png
Prepare Instructions
Resolve credentials in this order:
- Shell environment variables
- The current working directory only
.env ~/.transloadit/credentials
If your lives in a parent directory, export the variables into the shell first.
.envCreate in the current working directory.
steps.jsonImportant:
- For the current CLI, the file passed to must be a flat object keyed by step name.
--steps - Do not wrap the steps under a top-level key.
"steps"
json
{
":original": {
"robot": "/upload/handle"
},
"background_removed": {
"use": ":original",
"robot": "/image/bgremove",
"format": "png",
"result": true
}
}Run (Local Input Image)
bash
npx -y @transloadit/node assemblies create \
--steps ./steps.json \
-i ./input/source.jpg \
-o ./out/result.pngReplace with your real input image path when needed.
./input/source.jpgAfter the command finishes, confirm the PNG exists at the expected output path.
Debug If It Fails
bash
npx -y @transloadit/node assemblies get <assemblyIdOrUrl> -jNotes:
- Keep so the downloaded output preserves transparency.
format: "png" - Prefer as the default fallback when you want a reusable user-level setup.
~/.transloadit/credentials - A current-directory still takes precedence, so avoid it when deterministic account selection matters.
.env - If credentials only exist in a repo-root , run the command from that directory or export the variables first.
.env - Prefer an explicit PNG filename like . With the current CLI, using a directory output for a single result may preserve the input path instead of giving you a
./out/result.pngfilename..png - Prefer a clear foreground subject photo; background removal quality depends on the source image.