Poof
v1.5.2Remove backgrounds from images, videos and animated GIFs: transparent cutouts, mattes, GIF stickers.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
remove_background Remove Image Background
Remove the background from an image, leaving the subject on a transparent (or solid color) background. Accepts an image URL or base64-encoded image (PNG, JPEG, WebP or still GIF, up to 20 MB) and returns the processed image. For animated GIFs and videos use remove_video_background. Can also crop to the subject and resize the result to an exact width x height without stretching (width, height, fit). Costs 1 credit.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image input: a publicly accessible URL to a PNG, JPEG, WebP or still GIF image (including https://), or base64-encoded image data (optionally as a data: URL). Animated GIFs are videos: use remove_vide… |
bg_color | string | Background color (hex, rgb, or color name). Only applies when channels is 'rgb'. Example: '#ffffff' |
channels | string | Output color channels. Use 'rgba' for transparency, 'rgb' for an opaque background (bg_color, white by default), 'alpha' for the grayscale alpha mask only |
crop | boolean | Whether to crop the image to the subject bounds |
fit | string | How to fit the image into width x height. 'contain' pads the remaining area (transparent or bg_color), 'cover' fills the canvas and crops the overflow around the subject, 'scale-down' is like contain… |
format | string | Output image format. 'jpg' has no transparency |
height | integer | Output height in pixels. On its own, the width follows the aspect ratio. With width, the image is fitted into an exact width x height canvas without stretching |
size | string | Output image size preset (megapixel cap). Ignored when width or height is set |
width | integer | Output width in pixels. On its own, the height follows the aspect ratio. With height, the image is fitted into an exact width x height canvas without stretching |
remove_video_background Remove Video Background
Remove the background from a video given by public URL. Returns a job; when wait is true (default) the tool polls for up to 50 seconds and returns the finished job with result_url (a direct download link valid for 24 hours). For longer videos call get_job with the returned job id until status is completed. Costs 5 credits per second of video, rounded up (10 per second above 30 fps; animated GIFs are always 5 per second), charged when the job is accepted and refunded if it fails.
| Parameter | Type | Description |
|---|---|---|
video_url * | string | Public https URL of the video (mp4, mov, webm, m4v, mkv or animated gif; up to 500 MB and 5 minutes) |
bg_color | string | Background color (hex, rgb, or color name) used when the output has no transparency (channels 'rgb' or format 'mp4'). Defaults to white. Example: '#00ff00' for green screen |
channels | string | 'rgba' for a transparent video, 'rgb' for an opaque video on bg_color, 'alpha' for a grayscale matte video (no audio) |
format | string | Output container. 'webm' (VP9) and 'mov' (ProRes 4444) keep transparency; 'mp4' (H.264) has no alpha and is composited onto bg_color; 'gif' is a looping GIF with 1-bit transparency and no audio, cappe… |
size | string | Output size preset. The longest side is capped at 640 (preview), 1280 (medium) or 1920 (hd) pixels; full keeps the source resolution up to 4096 pixels (4K) |
wait | boolean | Poll until the job finishes (up to 50 seconds) before returning. Set to false to get the job id back immediately |
get_job Get Video Job
Get the status of a video background removal job started with remove_video_background (or by remove_background given an animated GIF). Polling is free. When status is completed the job carries result_url, a direct download link valid for 24 hours.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job id returned by remove_video_background (starts with job_) |
get_account Get Poof Account
Get the Poof account's plan and credit usage: maxCredits, usedCredits and remainingCredits for the current billing cycle. Free; use it to check whether there are credits left before processing many images.