Cutout Labs
v0.2.3Remove image backgrounds from local files or URLs and get transparent PNG cutouts.
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 a local image file or an image URL and save the result to disk. Returns the saved file path. Provide exactly one of input_path or image_url. When several objects or a person and a product appear together, the model may keep or drop some of them (for example a hand holding a product); use roi to restrict the subject area. Parts of a subject hidden behind something else cannot be recovered.
| Parameter | Type | Description |
|---|---|---|
bg_color | string | Background colour such as ffffff or white. Omit for transparency. |
clean_edges | boolean | Remove coloured fringes from the old background in hair, fur, and soft edges. |
crop | boolean | Crop the output to the subject. |
format | string | |
image_url | string | Public http(s) URL of the source image. |
input_path | string | Path to a local JPG, PNG or WebP image (max 12 MB). |
output_path | string | Where to save the result. Defaults to '<input name>-no-bg.<ext>' next to the input, or the current directory for URLs. |
overwrite | boolean | Replace output_path if it already exists. |
roi | string | Region of interest as 'x1 y1 x2 y2' in px or %, e.g. '20% 10% 80% 95%'. Only the subject inside this box is kept. |
size | string | preview ≈ 0.25 MP, medium 1.5 MP, hd 4 MP, full up to 25 MP. |
get_quota Check remaining free calls
Return how many free remove_background calls remain this month for the API key. The quota resets on the 1st of each month at 00:00 UTC.