Tool v1.0.0

removebg-api

使用 remove.bg API 通过 API 密钥认证去除图像背景,输出透明 PNG 格式。适用于需要高质量抠图且可接受云端处理的场景。

ClawHub 更新于 2026-03-23 23 浏览
下载 SKILL

技能说明

使用 remove.bg API 通过 API 密钥认证去除图像背景,输出透明 PNG 格式。适用于需要高质量抠图且可接受云端处理的场景。

使用场景

Remove image backgrounds via remove.bg API with API key, outputting transparent PNGs for high-quality cloud-based cutouts

查看英文原始说明

Remove image backgrounds using the remove.bg API with API-key auth and transparent PNG output. Use when high-quality cutouts are needed and cloud processing is acceptable.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/removebg-api
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 16 kB · zip 8.3 kB
手动下载 zip · 8.3 kB
SKILL.md text/markdown
---
name: removebg-api
description: Remove image backgrounds using the remove.bg API with API-key auth and transparent PNG output. Use when high-quality cutouts are needed and cloud processing is acceptable.
metadata:
  {
    "openclaw": {
      "requires": { "bins": ["uv", "python3"], "env": ["REMOVE_BG_API_KEY"] },
      "primaryEnv": "REMOVE_BG_API_KEY"
    }
  }
---

# removebg-api

Use remove.bg for high-quality background removal.

## API key setup

1. Create/sign in at `https://www.remove.bg/dashboard#api-key`
2. Create an API key
3. Configure `REMOVE_BG_API_KEY` in OpenClaw config (`openclaw.json`) so it is present in runtime environment.

## Important

- Skill metadata (`requires.env`) declares that `REMOVE_BG_API_KEY` is required.
- Metadata does **not** auto-load shell env files.
- Preferred: provide key via OpenClaw config-managed environment.

## Usage (preferred: uv)

Run from the skill directory:

```bash
uv run scripts/removebg_api.py --input /path/in.jpg --output /path/out.png
```

Options:

- `--size auto|preview|full|4k` (default: `auto`)
- `--format png|jpg|zip` (default: `png`)
Security defaults:

- `--input` must be a real image file *inside the OpenClaw workspace*.
- Allowed input types: `.png`, `.jpg`, `.jpeg`, `.webp` (extension + magic-byte validation).
- `--output` must be under `outputs/removebg-api/` inside the workspace.
- Large/abusive files are rejected (size + dimension limits).
- This prevents arbitrary file read/write outside normal skill boundaries.

Example:

```bash
uv run scripts/removebg_api.py --input ./input.jpg --output ./output.png --size auto --format png
```

## Fallback (without uv)

```bash
python3 scripts/removebg_api.py --input ./input.jpg --output ./output.png
```

## Output

- Writes result file to `--output`
- Prints `MEDIA:` line for chat workflows

## Notes

- API usage may consume free credits / paid quota.
- No absolute-path requirement for skill docs; use local paths in examples.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。