> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# remove-bg

> Background Removal

**Server path:** `/remove-bg` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                          | Description                                                                                                                                                                   |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`remove_bg_get_account`](#remove_bg_get_account)             | Get account information including API credit balance and usage details.                                                                                                       |
| [`remove_bg_remove_background`](#remove_bg_remove_background) | Remove the background from an image. Provide either an image\_url or image\_file\_b64 (base64-encoded image data). Returns the processed image. Uses one API credit per call. |

***

## remove\_bg\_get\_account

Get account information including API credit balance and usage details.

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## remove\_bg\_remove\_background

Remove the background from an image. Provide either an image\_url or image\_file\_b64 (base64-encoded image data). Returns the processed image. Uses one API credit per call.

**Parameters:**

| Parameter        | Type   | Required | Default | Description                                                                                 |
| ---------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `image_url`      | string | No       | —       | URL of the image to remove the background from. Provide this OR image\_file\_b64, not both. |
| `image_file_b64` | string | No       | —       | Base64-encoded image data. Provide this OR image\_url, not both.                            |
| `size`           | string | No       | —       | Output image resolution                                                                     |
| `type`           | string | No       | —       | Foreground type to help the AI detect the subject                                           |
| `format`         | string | No       | —       | Output image format                                                                         |
| `bg_color`       | string | No       | —       | Background color to apply (hex value like "81d4fa" or color name like "green")              |
| `bg_image_url`   | string | No       | —       | URL of a background image to composite behind the foreground                                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "image_url": {
        "type": "string",
        "description": "URL of the image to remove the background from. Provide this OR image_file_b64, not both."
      },
      "image_file_b64": {
        "type": "string",
        "description": "Base64-encoded image data. Provide this OR image_url, not both."
      },
      "size": {
        "type": "string",
        "description": "Output image resolution",
        "enum": [
          "auto",
          "preview",
          "small",
          "regular",
          "medium",
          "hd",
          "4k",
          "full"
        ]
      },
      "type": {
        "type": "string",
        "description": "Foreground type to help the AI detect the subject",
        "enum": [
          "auto",
          "person",
          "product",
          "car"
        ]
      },
      "format": {
        "type": "string",
        "description": "Output image format",
        "enum": [
          "auto",
          "png",
          "jpg",
          "zip"
        ]
      },
      "bg_color": {
        "type": "string",
        "description": "Background color to apply (hex value like \"81d4fa\" or color name like \"green\")"
      },
      "bg_image_url": {
        "type": "string",
        "description": "URL of a background image to composite behind the foreground"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>
