Documentation Index Fetch the complete documentation index at: https://docs.poof.bg/llms.txt
Use this file to discover all available pages before exploring further.
1. Get Your API Key
Copy Your API Key
Your API key is displayed on the dashboard. It starts with poof_.
Keep It Secret
Treat your API key like a password. Never commit it to version control or expose it in client-side code.
2. Make Your First Request
Choose your preferred method:
curl -X POST https://api.poof.bg/v1/remove \
-H "x-api-key: poof_your_api_key" \
-F "image_file=@input.jpg" \
-o output.png
Install the SDK: Remove a background: from poofbg import Poof
client = Poof( api_key = "poof_your_api_key" )
# From a file
result = client.remove( "input.jpg" )
result.save( "output.png" )
# From bytes
with open ( "input.jpg" , "rb" ) as f:
result = client.remove(f.read())
result.save( "output.png" )
Install the SDK: Remove a background: import { Poof } from '@poof-bg/js' ;
import fs from 'fs/promises' ;
const poof = new Poof ({ apiKey: 'poof_your_api_key' });
const image = await fs . readFile ( 'input.jpg' );
const result = await poof . remove ( image );
await fs . writeFile ( 'output.png' , result );
3. See the Result
Your output file now contains the image with the background removed:
Before After Original photo with background Transparent PNG, background removed
Success! You’ve made your first background removal request.
What’s Next?
Customize Output Learn about formats, sizes, and background colors
Check Usage Monitor your credit usage via the API
Handle Errors Implement robust error handling
Explore Integrations Use our official SDKs and integrations
Common Options
Here are some popular parameter combinations:
# Get a JPEG with white background
curl -X POST https://api.poof.bg/v1/remove \
-H "x-api-key: YOUR_API_KEY" \
-F "image_file=@photo.jpg" \
-F "format=jpg" \
-F "channels=rgb" \
-F "bg_color=#ffffff" \
-o result.jpg
# Get a small preview (faster, uses fewer credits)
curl -X POST https://api.poof.bg/v1/remove \
-H "x-api-key: YOUR_API_KEY" \
-F "image_file=@photo.jpg" \
-F "size=preview" \
-o preview.png
# Crop to subject bounds
curl -X POST https://api.poof.bg/v1/remove \
-H "x-api-key: YOUR_API_KEY" \
-F "image_file=@photo.jpg" \
-F "crop=true" \
-o cropped.png