@openpets/remove-bg
v1.0.1
Published
OpenPets plugin for the remove.bg API. Remove image backgrounds from URLs, local files, or base64 images, save processed results, check account credits, and submit difficult examples to the improvement program.
Downloads
176
Maintainers
Readme
remove.bg Pet
Use the remove.bg API from OpenPets-compatible agents to remove image backgrounds, check credits, and submit difficult examples to the improvement program.
Setup
- Get an API key from https://www.remove.bg/profile#api-key.
- Add it to your environment:
REMOVE_BG_API_KEY=your_api_key_hereOptional:
REMOVE_BG_HOST=https://api.remove.bg/v1.0Tools
remove-bg-test-connection- Verify credentials by fetching account information.remove-bg-get-account- Get credit balance and free API call details.remove-bg-remove-background- Remove a background fromimageUrl,imageFilePath, orimageFileBase64and save the result tooutputFilePath.remove-bg-submit-improvement- Submit a difficult image to the remove.bg improvement program.
Examples
pets exec remove-bg-test-connection --plugin ./index.ts --args '{}' --jsonpets exec remove-bg-remove-background --plugin ./index.ts --args '{
"imageUrl": "https://example.com/product.jpg",
"outputFilePath": "./product-no-bg.png",
"size": "preview",
"format": "png"
}' --jsonpets exec remove-bg-remove-background --plugin ./index.ts --args '{
"imageFilePath": "./portrait.jpg",
"outputFilePath": "./portrait-white-bg.jpg",
"format": "jpg",
"bgColor": "ffffff"
}' --jsonNotes
The remove.bg image endpoints use multipart form data and return binary image files, so this pet wraps the generated OpenAPI contract with file-oriented tools that save results locally instead of returning large binary payloads inline.
