---
title: RemBG v1.4 | Runware Docs
url: https://runware.ai/docs/models/rembg-v1-4
description: Efficient foreground extraction for image background removal
---
# RemBG v1.4

RemBG v1.4 is an optimized image background removal model focused on rapid and accurate separation of foreground subjects from background. It uses lightweight segmentation to produce clean alpha masks for visual assets, product photos, and portraits without manual editing.

- **ID**: `runware:109@1`
- **Status**: live
- **Release Date**: September 15, 2023
- **Capabilities**: Image to Image, Remove Background

## Request Parameters

**API Options**

Platform-level options for task execution and delivery.

### [taskType](https://runware.ai/docs/models/rembg-v1-4#request-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `removeBackground`

Identifier for the type of task being performed

### [taskUUID](https://runware.ai/docs/models/rembg-v1-4#request-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

### [outputType](https://runware.ai/docs/models/rembg-v1-4#request-outputtype)

- **Type**: `string`
- **Default**: `URL`

Image output type.

**Allowed values**: `URL` `base64Data` `dataURI`

### [outputFormat](https://runware.ai/docs/models/rembg-v1-4#request-outputformat)

- **Type**: `string`
- **Default**: `JPG`

Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.

- \`JPG\`: Best for photorealistic images with smaller file sizes (no transparency).
- \`PNG\`: Lossless compression, supports high quality and transparency (alpha channel).
- \`WEBP\`: Modern format providing superior compression and transparency support.

> [!NOTE]
> \*\*Transparency\*\*: If you are using features like background removal or LayerDiffuse that require transparency, you must select a format that supports an alpha channel (e.g., \`PNG\`, \`WEBP\`, \`TIFF\`). \`JPG\` does not support transparency.

**Allowed values**: `JPG` `PNG` `WEBP`

### [outputQuality](https://runware.ai/docs/models/rembg-v1-4#request-outputquality)

- **Type**: `integer`
- **Min**: `20`
- **Max**: `99`
- **Default**: `95`

Compression quality of the output. Higher values preserve quality but increase file size.

### [webhookURL](https://runware.ai/docs/models/rembg-v1-4#request-webhookurl)

- **Type**: `string`
- **Format**: `URI`

Specifies a webhook URL where JSON responses will be sent via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.

**Learn more** (1 resource):

- [Webhooks](https://runware.ai/docs/platform/webhooks) (platform)

### [deliveryMethod](https://runware.ai/docs/models/rembg-v1-4#request-deliverymethod)

- **Type**: `string`
- **Default**: `sync`

Determines how the API delivers task results.

**Allowed values**:

- `sync` Returns complete results directly in the API response.
- `async` Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.

**Learn more** (1 resource):

- [Task Polling](https://runware.ai/docs/platform/task-polling) (platform)

### [uploadEndpoint](https://runware.ai/docs/models/rembg-v1-4#request-uploadendpoint)

- **Type**: `string`
- **Format**: `URI`

Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.

**Common use cases:**

- **Cloud storage**: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.
- **CDN integration**: Upload to content delivery networks for immediate distribution.

```text
// S3 presigned URL for secure upload
https://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600

// Google Cloud Storage presigned URL
https://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789

// Custom storage endpoint
https://storage.example.com/uploads/generated-image.jpg
```

The content data will be sent as the request body to the specified URL when generation is complete.

### [ttl](https://runware.ai/docs/models/rembg-v1-4#request-ttl)

- **Type**: `integer`
- **Min**: `60`

Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.

### [includeCost](https://runware.ai/docs/models/rembg-v1-4#request-includecost)

- **Type**: `boolean`
- **Default**: `false`

Include task cost in the response.

**Inputs**

Input resources for the task (images, audio, etc). These must be nested inside the \`inputs\` object.

### [image](https://runware.ai/docs/models/rembg-v1-4#request-inputs-image)

- **Path**: `inputs.image`
- **Type**: `string`
- **Required**: true

Image input (UUID, URL, Data URI, or Base64).

**Generation Parameters**

Core parameters for controlling the generated content.

### [model](https://runware.ai/docs/models/rembg-v1-4#request-model)

- **Type**: `string`
- **Required**: true
- **Value**: `runware:109@1`

Identifier of the model to use for generation.

**Learn more** (3 resources):

- [Text To Image: Model Selection The Foundation Of Generation](https://runware.ai/docs/guides/text-to-image#model-selection-the-foundation-of-generation) (guide)
- [Image Inpainting: Model Specialized Inpainting Models](https://runware.ai/docs/guides/image-inpainting#model-specialized-inpainting-models) (guide)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/guides/image-outpainting#other-critical-parameters) (guide)

**Settings**

Technical parameters to fine-tune the inference process. These must be nested inside the \`settings\` object.

### [alphaMatting](https://runware.ai/docs/models/rembg-v1-4#request-settings-alphamatting)

- **Path**: `settings.alphaMatting`
- **Type**: `boolean`
- **Default**: `false`

Enable alpha matting to refine edges of the foreground object.

### [alphaMattingBackgroundThreshold](https://runware.ai/docs/models/rembg-v1-4#request-settings-alphamattingbackgroundthreshold)

- **Path**: `settings.alphaMattingBackgroundThreshold`
- **Type**: `integer`
- **Min**: `1`
- **Max**: `255`
- **Default**: `10`

Threshold used in alpha matting to refine background areas. Higher values remove more background but increase computation time.

### [alphaMattingErodeSize](https://runware.ai/docs/models/rembg-v1-4#request-settings-alphamattingerodesize)

- **Path**: `settings.alphaMattingErodeSize`
- **Type**: `integer`
- **Min**: `1`
- **Max**: `255`
- **Default**: `10`

Size of the erosion operation used to smooth the edges of the foreground object.

### [alphaMattingForegroundThreshold](https://runware.ai/docs/models/rembg-v1-4#request-settings-alphamattingforegroundthreshold)

- **Path**: `settings.alphaMattingForegroundThreshold`
- **Type**: `integer`
- **Min**: `1`
- **Max**: `255`
- **Default**: `240`

Threshold used in alpha matting to distinguish foreground from background. Affects edge sharpness.

### [postProcessMask](https://runware.ai/docs/models/rembg-v1-4#request-settings-postprocessmask)

- **Path**: `settings.postProcessMask`
- **Type**: `boolean`
- **Default**: `false`

Enable additional post-processing to improve mask accuracy.

### [returnOnlyMask](https://runware.ai/docs/models/rembg-v1-4#request-settings-returnonlymask)

- **Path**: `settings.returnOnlyMask`
- **Type**: `boolean`
- **Default**: `false`

Return only the mask instead of the processed image.

### [rgba](https://runware.ai/docs/models/rembg-v1-4#request-settings-rgba)

- **Path**: `settings.rgba`
- **Type**: `array of integers`
- **Min**: `0`
- **Max**: `255`
- **Default**: `255,255,255,0`

Background color as `[red, green, blue, alpha]` array.

## Response Parameters

### [taskType](https://runware.ai/docs/models/rembg-v1-4#response-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `removeBackground`

Type of the task.

### [taskUUID](https://runware.ai/docs/models/rembg-v1-4#response-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID of the task.

### [imageUUID](https://runware.ai/docs/models/rembg-v1-4#response-imageuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID of the output image.

### [imageURL](https://runware.ai/docs/models/rembg-v1-4#response-imageurl)

- **Type**: `string`
- **Format**: `URI`

URL of the output image.

### [imageBase64Data](https://runware.ai/docs/models/rembg-v1-4#response-imagebase64data)

- **Type**: `string`

Base64-encoded image data.

### [imageDataURI](https://runware.ai/docs/models/rembg-v1-4#response-imagedatauri)

- **Type**: `string`
- **Format**: `URI`

Data URI of the output image.

### [cost](https://runware.ai/docs/models/rembg-v1-4#response-cost)

- **Type**: `float`

Task cost in USD. Present when `includeCost` is set to `true` in the request.

## Examples

### Pixelated Toy Robot Portrait (Remove Background)

![Pixelated Toy Robot Portrait](https://assets.runware.ai/examples/rembg-v1-4/745f7f31-36e2-4902-9041-ad1a1c8d1169.png)

**Request**:

```json
{
  "taskType": "removeBackground",
  "taskUUID": "cdc8c516-310a-4646-b983-9cd3ec6993e4",
  "model": "runware:109@1",
  "settings": {
    "rgba": [
      255,
      255,
      255,
      0
    ],
    "postProcessMask": true,
    "alphaMatting": true,
    "alphaMattingForegroundThreshold": 230,
    "alphaMattingBackgroundThreshold": 15,
    "alphaMattingErodeSize": 8
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/835cc7d5-93d0-4af4-a427-2427f170084d.jpg"
  }
}
```

**Response**:

```json
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "cdc8c516-310a-4646-b983-9cd3ec6993e4",
  "imageUUID": "7e745c5e-2a3a-4a44-b9d0-1920c8866d14",
  "imageURL": "https://im.runware.ai/image/os/a13d12/ws/3/ii/7e745c5e-2a3a-4a44-b9d0-1920c8866d14.png",
  "cost": 0.0013,
  "inputImageUUID": "5071606e-5a78-4c28-bde5-66a1534ddde0"
}
```

---

### Pixel Sprite Character Cutout (Remove Background)

![Pixel Sprite Character Cutout](https://assets.runware.ai/examples/rembg-v1-4/d2bd05e0-6435-467b-9139-6f8b8e28cb51.png)

**Request**:

```json
{
  "taskType": "removeBackground",
  "taskUUID": "277fb836-9d5c-4b60-b80b-70441b2e97e4",
  "model": "runware:109@1",
  "settings": {
    "rgba": [
      255,
      255,
      255,
      0
    ],
    "postProcessMask": true,
    "alphaMatting": true,
    "alphaMattingForegroundThreshold": 235,
    "alphaMattingBackgroundThreshold": 12,
    "alphaMattingErodeSize": 4
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/35b37672-4a53-4bbd-8781-94b3895832d1.jpg"
  }
}
```

**Response**:

```json
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "277fb836-9d5c-4b60-b80b-70441b2e97e4",
  "imageUUID": "0755f8e6-2323-417b-8f6f-962e9cb8877e",
  "imageURL": "https://im.runware.ai/image/os/a24d12/ws/3/ii/0755f8e6-2323-417b-8f6f-962e9cb8877e.png",
  "cost": 0.0013,
  "inputImageUUID": "9cd88089-8856-4e22-9b3a-9622ad153ef1"
}
```