> ## 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.

# Quickstart

> Remove your first background in under 2 minutes

## 1. Get Your API Key

<Steps>
  <Step title="Create an Account">
    Go to [dash.poof.bg](https://dash.poof.bg) and sign up with your email or GitHub.
  </Step>

  <Step title="Copy Your API Key">
    Your API key is displayed on the dashboard. It starts with `poof_`.
  </Step>

  <Step title="Keep It Secret">
    Treat your API key like a password. Never commit it to version control or expose it in client-side code.
  </Step>
</Steps>

## 2. Make Your First Request

Choose your preferred method:

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    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
    ```
  </Tab>

  <Tab title="Python">
    Install the SDK:

    ```bash theme={null}
    pip install poofbg
    ```

    Remove a background:

    ```python theme={null}
    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")
    ```
  </Tab>

  <Tab title="TypeScript">
    Install the SDK:

    ```bash theme={null}
    npm install @poof-bg/js
    ```

    Remove a background:

    ```typescript theme={null}
    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);
    ```
  </Tab>
</Tabs>

## 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 |

<Check>
  **Success!** You've made your first background removal request.
</Check>

## What's Next?

<CardGroup cols={2}>
  <Card title="Customize Output" icon="sliders" href="/api-reference/remove-background">
    Learn about formats, sizes, and background colors
  </Card>

  <Card title="Check Usage" icon="chart-line" href="/api-reference/account">
    Monitor your credit usage via the API
  </Card>

  <Card title="Handle Errors" icon="triangle-exclamation" href="/errors">
    Implement robust error handling
  </Card>

  <Card title="Explore Integrations" icon="puzzle-piece" href="/integrations/overview">
    Use our official SDKs and integrations
  </Card>
</CardGroup>

## Common Options

Here are some popular parameter combinations:

```bash theme={null}
# 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

# Get just the grayscale alpha mask
curl -X POST https://api.poof.bg/v1/remove \
  -H "x-api-key: YOUR_API_KEY" \
  -F "image_file=@photo.jpg" \
  -F "channels=alpha" \
  -o mask.png
```
