{"name":"Background Removal API","version":"2.1","modes":{"human":"Optimized for people (birefnet-portrait)","object":"General objects (birefnet-general-lite)"},"endpoints":{"/remove":"Single image processing (GPU-optimized, <2s)","/batch":"Multiple images → ZIP file","/health":"Service status with GPU info"},"parameters":{"mode":"human or object","upscale_2x":"Process at 2x resolution (better quality)","auto_crop":"Crop to content bounds","boost":"Scale final image to 2880px height (default: false)","use_alpha_matting":"Enable alpha matting for better edges (slower, default: false)","crop_padding":"Padding when cropping (pixels)","erode_size":"Edge refinement (5-15, only with alpha_matting)","foreground_threshold":"What to keep (180-240, only with alpha_matting)","background_threshold":"What to remove (30-120, only with alpha_matting)","output_format":"PNG or JPEG"},"performance":{"gpu_only_mode":"< 2 seconds (default, use_alpha_matting=false)","with_alpha_matting":"5-10 seconds (better hair/fur edges)","with_boost":"Adds ~0.5s for bicubic scaling to 2880px height","gpu_provider":"TensorRT FP16 > CUDA > CPU"},"usage_examples":{"basic_fast":"curl -X POST 'http://localhost:8000/remove' -F 'file=@image.png' -F 'mode=human' -o output.png","with_upscale":"curl -X POST 'http://localhost:8000/remove' -F 'file=@image.png' -F 'mode=human' -F 'upscale_2x=true' -F 'auto_crop=true' -o output.png","with_boost":"curl -X POST 'http://localhost:8000/remove' -F 'file=@image.png' -F 'mode=human' -F 'boost=true' -o output_2880.png","with_alpha_matting":"curl -X POST 'http://localhost:8000/remove' -F 'file=@image.png' -F 'mode=human' -F 'use_alpha_matting=true' -o output_hq.png","batch":"curl -X POST 'http://localhost:8000/batch' -F 'files=@img1.png' -F 'files=@img2.png' -F 'mode=human' -F 'boost=true' -o batch.zip"},"recommendations":{"people_photos":"Use mode=human with auto_crop=true","product_photos":"Use mode=object with upscale_2x=true for best quality","high_res_output":"Use boost=true for 2880px height output","white_backgrounds":"Set background_threshold=70-100","gray_backgrounds":"Set background_threshold=50-80"}}