
Raycast extension to remove the background from an image using the Leonardo.Ai API (formerly the remove.bg API)
Starting December 1, 2026, the remove.bg API moves to Leonardo.Ai (migration guide). remove.bg keys don't carry over, so you need a Leonardo.Ai API key:
Leonardo.Ai bills every background removal, about $0.10 per image at the time of writing (pricing calculator).
remove background from imageSelect imageIf everything went well, a toast will appear with the name of the output image. Your output image will be saved to the same directory as your input image, as a PNG named removed-<name>.png.
For direct Base64 input, Leonardo.Ai's migration checklist recommends images under about 7.5 MB. Use a smaller copy if the service rejects a large image.
Remove the background from an image
removed-<name>.png) without overwriting existing files, including files created while processing. Leonardo.Ai recommends images under about 7.5 MB for direct input, so larger files may need a smaller copy