Terminal
Terminal/Skill
Removes the background from a local image and saves a transparent PNG, using the Transloadit CLI.
By Transloadit
Works with
npx skills add transloadit/skills --skill transform-remove-background-with-transloadit.pngResolve credentials in this order:
.env only~/.transloadit/credentialsIf your .env lives in a parent directory, export the variables into the shell first.
Create steps.json in the current working directory.
Important:
--steps must be a flat object keyed by step name."steps" key.{
":original": {
"robot": "/upload/handle"
},
"background_removed": {
"use": ":original",
"robot": "/image/bgremove",
"format": "png",
"result": true
}
}
npx -y @transloadit/node assemblies create \
--steps ./steps.json \
-i ./input/source.jpg \
-o ./out/result.png
Replace ./input/source.jpg with your real input image path when needed.
After the command finishes, confirm the PNG exists at the expected output path.
npx -y @transloadit/node assemblies get <assemblyIdOrUrl> -j
Notes:
format: "png" so the downloaded output preserves transparency.~/.transloadit/credentials as the default fallback when you want a reusable user-level setup..env still takes precedence, so avoid it when deterministic account selection matters..env, run the command from that directory or export the variables first../out/result.png. With the current CLI, using a directory output for a single result may preserve the input path instead of giving you a .png filename.