# Pixelcut Product Photo

> Pixelcut's Background Remover produces fast, high-quality cutouts built for e-commerce product imagery


## Overview

- **Endpoint**: `https://fal.run/pixelcut/product-photo`
- **Model ID**: `pixelcut/product-photo`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: utility, editing



## Pricing

- **Price**: $0.024 per images

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`image_url`** (`string`, _required_):
  URL of the product image to be processed.
  - Examples: "https://cdn3.pixelcut.app/fal/product-photos/input.png"

- **`image_size`** (`ImageSize | Enum`, _optional_):
  Output canvas size. A preset (square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9) or a custom {width, height}. Defaults to square_hd (1024x1024). Default value: `square_hd`
  - Default: `"square_hd"`
  - One of: ImageSize | Enum

- **`background`** (`Background`, _optional_):
  Output background: solid color (default white), transparent, or an image.
  - Examples: {"image_fit":"Cover","mode":"Color","color":{"g":255,"r":255,"b":255}}

- **`margin`** (`Margin`, _optional_):
  Canvas margins around the product: `all` for every side plus optional per-side overrides. Defaults to 20% on all sides.
  - Examples: {"all":"20%"}

- **`shadow`** (`Shadow`, _optional_):
  Shadow: choose a type ('Generative'/'Drop'; unset = no shadow) and set its params.
  - Examples: {"type":"Generative"}

- **`watermark`** (`Watermark`, _optional_):
  Optional logo/watermark image overlaid on top of the output. Off by default; omit for no watermark.

- **`output_format`** (`Enum`, _optional_):
  The format of the resultant image (PNG or JPEG). When not set, matches the input format. A transparent background is always PNG.
  - Options: `"png"`, `"jpeg"`

- **`sync_mode`** (`boolean`, _optional_):
  When true, return the result as a data URL instead of uploading to storage. Default value: `true`
  - Default: `true`



**Required Parameters Example**:

```json
{
  "image_url": "https://cdn3.pixelcut.app/fal/product-photos/input.png"
}
```

**Full Example**:

```json
{
  "image_url": "https://cdn3.pixelcut.app/fal/product-photos/input.png",
  "image_size": "square_hd",
  "background": {
    "image_fit": "Cover",
    "mode": "Color",
    "color": {
      "g": 255,
      "r": 255,
      "b": 255
    }
  },
  "margin": {
    "all": "20%"
  },
  "shadow": {
    "type": "Generative"
  },
  "sync_mode": true
}
```


### Output Schema

The API returns the following output format:

- **`image`** (`Image`, _optional_):
  Catalog-ready product photo.
  - Examples: {"url":"https://cdn3.pixelcut.app/fal/product-photos/output.png"}



**Example Response**:

```json
{
  "image": {
    "url": "https://cdn3.pixelcut.app/fal/product-photos/output.png"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/pixelcut/product-photo \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://cdn3.pixelcut.app/fal/product-photos/input.png"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "pixelcut/product-photo",
    arguments={
        "image_url": "https://cdn3.pixelcut.app/fal/product-photos/input.png"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("pixelcut/product-photo", {
  input: {
    image_url: "https://cdn3.pixelcut.app/fal/product-photos/input.png"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/pixelcut/product-photo)
- [API Documentation](https://fal.ai/models/pixelcut/product-photo/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=pixelcut/product-photo)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
