ChatGPT
在 Settings → Apps 中開啟開發者模式,並使用伺服器 URL https://removebackground.dev/mcp 和 OAuth 登入建立一個應用。連線後登入 removebackground.dev,然後上傳照片並要求去除背景。
只需將 removebackground.dev 新增到你的 AI 應用一次,之後讓它摳出照片即可。你會在聊天中收到透明 PNG,由與網站相同的引擎生成。
https://removebackground.dev/mcp應用使用你的 removebackground.dev 帳戶登入。無法登入的應用可以改用 API 金鑰。
在 Settings → Apps 中開啟開發者模式,並使用伺服器 URL https://removebackground.dev/mcp 和 OAuth 登入建立一個應用。連線後登入 removebackground.dev,然後上傳照片並要求去除背景。
在 Settings → Connectors 中選擇 Add custom connector,貼上 https://removebackground.dev/mcp 並點選 Connect。登入 removebackground.dev 並允許訪問。
執行一次以下命令,然後在 Claude Code 中輸入 /mcp 登入。
claude mcp add --transport http removebackground https://removebackground.dev/mcp將以下內容新增到 ~/.cursor/mcp.json。Cursor 第一次使用該伺服器時會要求你登入。
{
"mcpServers": {
"removebackground": {
"url": "https://removebackground.dev/mcp"
}
}
}將以下內容新增到 .vscode/mcp.json,然後從檔案中啟動伺服器並登入。
{
"servers": {
"removebackground": {
"type": "http",
"url": "https://removebackground.dev/mcp"
}
}
}新增一個 MCP Client 節點(AI 代理則使用 MCP Client Tool)。將傳輸方式設為 HTTP Streamable,URL 設為 https://removebackground.dev/mcp,認證方式設為 Bearer 並填入你的 API 金鑰。
任何可以新增請求頭的 MCP 應用都能使用 API 金鑰。在帳戶頁面的 API 金鑰中建立一個,並以 Authorization: Bearer(或 X-Api-Key)傳送。
Authorization: Bearer rbg_your_api_key| 工具 | 作用 |
|---|---|
remove_background | 去除上傳圖片、圖片 URL 或 base64 資料中的背景。返回下載連結(PNG、WebP 或 JPG)和預覽。選項:背景顏色、尺寸以及按主體裁剪。 |
get_job | 獲取耗時超過幾秒的去背景任務結果。 |
check_credits | 顯示你帳戶中剩餘的點數。 |
每張圖片消耗 1 點數,與 API 相同。失敗的圖片免費,點數永不過期。 新帳戶贈送 50 免費點數。
AI 應用每處理一張圖片,會從你的帳戶扣除 1 點數。新帳戶贈送 50 免費點數,點數包永不過期。
不需要。ChatGPT、Claude、Cursor 和 VS Code 使用你的 removebackground.dev 帳戶登入。只有無法登入的應用(例如 n8n)才需要 API 金鑰。
它們只用於生成你的去背。上傳的檔案和結果會在 48 小時後刪除,下載連結在 24 小時後失效。
每個已連線的應用都有自己的金鑰,以應用名稱命名,顯示在帳戶頁面的 API 金鑰中。撤銷該金鑰,應用就會立即斷開連線。
支援最大 25 MB 的 JPG、PNG 和 WebP。結果預設為透明 PNG,也可以是 WebP,或帶有你所選背景顏色的 JPG。