MODEL IDrunware:109@1
live

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.

RemBG v1.4
remove-background

Archival Dusting Brush Product Cutout

Archival Dusting Brush Product Cutout
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  outputFormat: 'PNG',
  model: 'runware:109@1',
  settings: {
    alphaMatting: true,
    postProcessMask: true,
    returnOnlyMask: false,
    rgba: [
      255,
      255,
      255,
      0
    ]
  },
  inputs: {
    image: 'https://assets.runware.ai/assets/inputs/2a2c5120-a79b-47bb-806e-ee7d788efe74.jpg'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "outputFormat": "PNG",
            "model": "runware:109@1",
            "settings": {
                "alphaMatting": True,
                "postProcessMask": True,
                "returnOnlyMask": False,
                "rgba": [
                    255,
                    255,
                    255,
                    0
                ]
            },
            "inputs": {
                "image": "https://assets.runware.ai/assets/inputs/2a2c5120-a79b-47bb-806e-ee7d788efe74.jpg"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "removeBackground",
      "taskUUID": "bcd6119a-e3df-421a-9a61-e419ccd6b3e3",
      "outputFormat": "PNG",
      "model": "runware:109@1",
      "settings": {
        "alphaMatting": true,
        "postProcessMask": true,
        "returnOnlyMask": false,
        "rgba": [
          255,
          255,
          255,
          0
        ]
      },
      "inputs": {
        "image": "https://assets.runware.ai/assets/inputs/2a2c5120-a79b-47bb-806e-ee7d788efe74.jpg"
      }
    }
  ]'
runware run runware:109@1 \
  outputFormat=PNG \
  settings.alphaMatting=true \
  settings.postProcessMask=true \
  settings.returnOnlyMask=false \
  settings.rgba.0=255 \
  settings.rgba.1=255 \
  settings.rgba.2=255 \
  settings.rgba.3=0 \
  inputs.image=https://assets.runware.ai/assets/inputs/2a2c5120-a79b-47bb-806e-ee7d788efe74.jpg
{
  "taskType": "removeBackground",
  "taskUUID": "bcd6119a-e3df-421a-9a61-e419ccd6b3e3",
  "outputFormat": "PNG",
  "model": "runware:109@1",
  "settings": {
    "alphaMatting": true,
    "postProcessMask": true,
    "returnOnlyMask": false,
    "rgba": [
      255,
      255,
      255,
      0
    ]
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/2a2c5120-a79b-47bb-806e-ee7d788efe74.jpg"
  }
}
Response
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "bcd6119a-e3df-421a-9a61-e419ccd6b3e3",
  "imageUUID": "7c8f0937-0d3f-406b-b9c0-d038c8f6ffe7",
  "imageURL": "https://im.runware.ai/image/os/a01d21/ws/5/ii/7c8f0937-0d3f-406b-b9c0-d038c8f6ffe7.png",
  "cost": 0.0006,
  "inputImageUUID": "40c65c73-1cab-4f60-b6c0-f27813201a7b"
}
remove-background

Sled Dog Arctic Scene Cutout

Sled Dog Arctic Scene Cutout
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  outputFormat: 'PNG',
  model: 'runware:109@1',
  settings: {
    alphaMatting: true,
    postProcessMask: true,
    returnOnlyMask: false,
    rgba: [
      255,
      255,
      255,
      0
    ]
  },
  inputs: {
    image: 'https://assets.runware.ai/assets/inputs/ba23a7ad-8754-47fc-85c4-eb18e6edd2ee.jpg'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "outputFormat": "PNG",
            "model": "runware:109@1",
            "settings": {
                "alphaMatting": True,
                "postProcessMask": True,
                "returnOnlyMask": False,
                "rgba": [
                    255,
                    255,
                    255,
                    0
                ]
            },
            "inputs": {
                "image": "https://assets.runware.ai/assets/inputs/ba23a7ad-8754-47fc-85c4-eb18e6edd2ee.jpg"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "removeBackground",
      "taskUUID": "20f75586-842a-41ae-913c-769d05a63f53",
      "outputFormat": "PNG",
      "model": "runware:109@1",
      "settings": {
        "alphaMatting": true,
        "postProcessMask": true,
        "returnOnlyMask": false,
        "rgba": [
          255,
          255,
          255,
          0
        ]
      },
      "inputs": {
        "image": "https://assets.runware.ai/assets/inputs/ba23a7ad-8754-47fc-85c4-eb18e6edd2ee.jpg"
      }
    }
  ]'
runware run runware:109@1 \
  outputFormat=PNG \
  settings.alphaMatting=true \
  settings.postProcessMask=true \
  settings.returnOnlyMask=false \
  settings.rgba.0=255 \
  settings.rgba.1=255 \
  settings.rgba.2=255 \
  settings.rgba.3=0 \
  inputs.image=https://assets.runware.ai/assets/inputs/ba23a7ad-8754-47fc-85c4-eb18e6edd2ee.jpg
{
  "taskType": "removeBackground",
  "taskUUID": "20f75586-842a-41ae-913c-769d05a63f53",
  "outputFormat": "PNG",
  "model": "runware:109@1",
  "settings": {
    "alphaMatting": true,
    "postProcessMask": true,
    "returnOnlyMask": false,
    "rgba": [
      255,
      255,
      255,
      0
    ]
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/ba23a7ad-8754-47fc-85c4-eb18e6edd2ee.jpg"
  }
}
Response
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "20f75586-842a-41ae-913c-769d05a63f53",
  "imageUUID": "04c64a5d-b820-409d-81e5-f1685cdd3179",
  "imageURL": "https://im.runware.ai/image/os/a01d21/ws/5/ii/04c64a5d-b820-409d-81e5-f1685cdd3179.png",
  "cost": 0.0006,
  "inputImageUUID": "ba6479c0-f051-453c-bcc5-7e6acf8f7452"
}
Remove Background

Pixel Sprite Character Cutout

Pixel Sprite Character Cutout
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  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'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "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"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "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"
      }
    }
  ]'
runware run runware:109@1 \
  settings.rgba.0=255 \
  settings.rgba.1=255 \
  settings.rgba.2=255 \
  settings.rgba.3=0 \
  settings.postProcessMask=true \
  settings.alphaMatting=true \
  settings.alphaMattingForegroundThreshold=235 \
  settings.alphaMattingBackgroundThreshold=12 \
  settings.alphaMattingErodeSize=4 \
  inputs.image=https://assets.runware.ai/assets/inputs/35b37672-4a53-4bbd-8781-94b3895832d1.jpg
{
  "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
{
  "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"
}
Remove Background

Pixelated Toy Robot Portrait

Pixelated Toy Robot Portrait
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  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'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "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"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "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"
      }
    }
  ]'
runware run runware:109@1 \
  settings.rgba.0=255 \
  settings.rgba.1=255 \
  settings.rgba.2=255 \
  settings.rgba.3=0 \
  settings.postProcessMask=true \
  settings.alphaMatting=true \
  settings.alphaMattingForegroundThreshold=230 \
  settings.alphaMattingBackgroundThreshold=15 \
  settings.alphaMattingErodeSize=8 \
  inputs.image=https://assets.runware.ai/assets/inputs/835cc7d5-93d0-4af4-a427-2427f170084d.jpg
{
  "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
{
  "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"
}
Remove Background

Feathered Cabaret Headpiece Portrait

Feathered Cabaret Headpiece Portrait
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'runware:109@1',
  settings: {
    alphaMatting: true,
    alphaMattingBackgroundThreshold: 12,
    alphaMattingErodeSize: 4,
    alphaMattingForegroundThreshold: 242,
    postProcessMask: true,
    returnOnlyMask: false,
    rgba: [
      255,
      255,
      255,
      0
    ]
  },
  inputs: {
    image: 'https://assets.runware.ai/assets/inputs/9a8c80f0-146a-4678-b103-20c422db2049.jpg'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "runware:109@1",
            "settings": {
                "alphaMatting": True,
                "alphaMattingBackgroundThreshold": 12,
                "alphaMattingErodeSize": 4,
                "alphaMattingForegroundThreshold": 242,
                "postProcessMask": True,
                "returnOnlyMask": False,
                "rgba": [
                    255,
                    255,
                    255,
                    0
                ]
            },
            "inputs": {
                "image": "https://assets.runware.ai/assets/inputs/9a8c80f0-146a-4678-b103-20c422db2049.jpg"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "removeBackground",
      "taskUUID": "3962706f-6f5e-4687-90b5-3c29e272b6d6",
      "model": "runware:109@1",
      "settings": {
        "alphaMatting": true,
        "alphaMattingBackgroundThreshold": 12,
        "alphaMattingErodeSize": 4,
        "alphaMattingForegroundThreshold": 242,
        "postProcessMask": true,
        "returnOnlyMask": false,
        "rgba": [
          255,
          255,
          255,
          0
        ]
      },
      "inputs": {
        "image": "https://assets.runware.ai/assets/inputs/9a8c80f0-146a-4678-b103-20c422db2049.jpg"
      }
    }
  ]'
runware run runware:109@1 \
  settings.alphaMatting=true \
  settings.alphaMattingBackgroundThreshold=12 \
  settings.alphaMattingErodeSize=4 \
  settings.alphaMattingForegroundThreshold=242 \
  settings.postProcessMask=true \
  settings.returnOnlyMask=false \
  settings.rgba.0=255 \
  settings.rgba.1=255 \
  settings.rgba.2=255 \
  settings.rgba.3=0 \
  inputs.image=https://assets.runware.ai/assets/inputs/9a8c80f0-146a-4678-b103-20c422db2049.jpg
{
  "taskType": "removeBackground",
  "taskUUID": "3962706f-6f5e-4687-90b5-3c29e272b6d6",
  "model": "runware:109@1",
  "settings": {
    "alphaMatting": true,
    "alphaMattingBackgroundThreshold": 12,
    "alphaMattingErodeSize": 4,
    "alphaMattingForegroundThreshold": 242,
    "postProcessMask": true,
    "returnOnlyMask": false,
    "rgba": [
      255,
      255,
      255,
      0
    ]
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/9a8c80f0-146a-4678-b103-20c422db2049.jpg"
  }
}
Response
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "3962706f-6f5e-4687-90b5-3c29e272b6d6",
  "imageUUID": "5dc78a86-9a26-4bec-974d-36a064686378",
  "imageURL": "https://im.runware.ai/image/os/a09dlim3/ws/5/ii/5dc78a86-9a26-4bec-974d-36a064686378.png",
  "cost": 0.0051,
  "inputImageUUID": "ba0fd9ee-2d0d-442f-9e87-974633f8f040"
}
foreground-mask

Airport Wildlife Team Portrait Cutout

Airport Wildlife Team Portrait Cutout
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  outputFormat: 'PNG',
  model: 'runware:109@1',
  settings: {
    alphaMatting: true,
    postProcessMask: true,
    returnOnlyMask: true
  },
  inputs: {
    image: 'https://assets.runware.ai/assets/inputs/9c8b20d0-74b4-4276-a944-246e849b3479.jpg'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "outputFormat": "PNG",
            "model": "runware:109@1",
            "settings": {
                "alphaMatting": True,
                "postProcessMask": True,
                "returnOnlyMask": True
            },
            "inputs": {
                "image": "https://assets.runware.ai/assets/inputs/9c8b20d0-74b4-4276-a944-246e849b3479.jpg"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "removeBackground",
      "taskUUID": "08b73e3e-3de1-489d-b645-e7437765a4b7",
      "outputFormat": "PNG",
      "model": "runware:109@1",
      "settings": {
        "alphaMatting": true,
        "postProcessMask": true,
        "returnOnlyMask": true
      },
      "inputs": {
        "image": "https://assets.runware.ai/assets/inputs/9c8b20d0-74b4-4276-a944-246e849b3479.jpg"
      }
    }
  ]'
runware run runware:109@1 \
  outputFormat=PNG \
  settings.alphaMatting=true \
  settings.postProcessMask=true \
  settings.returnOnlyMask=true \
  inputs.image=https://assets.runware.ai/assets/inputs/9c8b20d0-74b4-4276-a944-246e849b3479.jpg
{
  "taskType": "removeBackground",
  "taskUUID": "08b73e3e-3de1-489d-b645-e7437765a4b7",
  "outputFormat": "PNG",
  "model": "runware:109@1",
  "settings": {
    "alphaMatting": true,
    "postProcessMask": true,
    "returnOnlyMask": true
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/9c8b20d0-74b4-4276-a944-246e849b3479.jpg"
  }
}
Response
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "08b73e3e-3de1-489d-b645-e7437765a4b7",
  "imageUUID": "46788326-391f-49dd-8ba0-df7dca85e8ff",
  "imageURL": "https://im.runware.ai/image/os/a08dlim3/ws/4/ii/46788326-391f-49dd-8ba0-df7dca85e8ff.png",
  "cost": 0.0006,
  "inputImageUUID": "a6cb4a2c-cdcc-4b64-bbfb-05fb1838cecc"
}
Remove Background

Fringed Cowboy Boot Product Cutout

Fringed Cowboy Boot Product Cutout
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'runware:109@1',
  settings: {
    alphaMatting: true,
    alphaMattingBackgroundThreshold: 12,
    alphaMattingErodeSize: 4,
    alphaMattingForegroundThreshold: 242,
    postProcessMask: true,
    returnOnlyMask: false,
    rgba: [
      255,
      255,
      255,
      0
    ]
  },
  inputs: {
    image: 'https://assets.runware.ai/assets/inputs/72454a33-d7b3-4da3-970d-b8c834836750.jpg'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "runware:109@1",
            "settings": {
                "alphaMatting": True,
                "alphaMattingBackgroundThreshold": 12,
                "alphaMattingErodeSize": 4,
                "alphaMattingForegroundThreshold": 242,
                "postProcessMask": True,
                "returnOnlyMask": False,
                "rgba": [
                    255,
                    255,
                    255,
                    0
                ]
            },
            "inputs": {
                "image": "https://assets.runware.ai/assets/inputs/72454a33-d7b3-4da3-970d-b8c834836750.jpg"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "removeBackground",
      "taskUUID": "6541d00b-d8c9-48f1-be40-23ebe70a5bc0",
      "model": "runware:109@1",
      "settings": {
        "alphaMatting": true,
        "alphaMattingBackgroundThreshold": 12,
        "alphaMattingErodeSize": 4,
        "alphaMattingForegroundThreshold": 242,
        "postProcessMask": true,
        "returnOnlyMask": false,
        "rgba": [
          255,
          255,
          255,
          0
        ]
      },
      "inputs": {
        "image": "https://assets.runware.ai/assets/inputs/72454a33-d7b3-4da3-970d-b8c834836750.jpg"
      }
    }
  ]'
runware run runware:109@1 \
  settings.alphaMatting=true \
  settings.alphaMattingBackgroundThreshold=12 \
  settings.alphaMattingErodeSize=4 \
  settings.alphaMattingForegroundThreshold=242 \
  settings.postProcessMask=true \
  settings.returnOnlyMask=false \
  settings.rgba.0=255 \
  settings.rgba.1=255 \
  settings.rgba.2=255 \
  settings.rgba.3=0 \
  inputs.image=https://assets.runware.ai/assets/inputs/72454a33-d7b3-4da3-970d-b8c834836750.jpg
{
  "taskType": "removeBackground",
  "taskUUID": "6541d00b-d8c9-48f1-be40-23ebe70a5bc0",
  "model": "runware:109@1",
  "settings": {
    "alphaMatting": true,
    "alphaMattingBackgroundThreshold": 12,
    "alphaMattingErodeSize": 4,
    "alphaMattingForegroundThreshold": 242,
    "postProcessMask": true,
    "returnOnlyMask": false,
    "rgba": [
      255,
      255,
      255,
      0
    ]
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/72454a33-d7b3-4da3-970d-b8c834836750.jpg"
  }
}
Response
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "6541d00b-d8c9-48f1-be40-23ebe70a5bc0",
  "imageUUID": "dca788da-4415-4115-b046-4a5780baee44",
  "imageURL": "https://im.runware.ai/image/os/a09dlim3/ws/5/ii/dca788da-4415-4115-b046-4a5780baee44.png",
  "cost": 0.0038,
  "inputImageUUID": "b771c426-c17d-4e8a-b52c-6fc63f5797c2"
}
foreground-mask

Rare-Book Conservator Press Headshot

Rare-Book Conservator Press Headshot
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  outputFormat: 'PNG',
  model: 'runware:109@1',
  settings: {
    alphaMatting: true,
    postProcessMask: true,
    returnOnlyMask: true
  },
  inputs: {
    image: 'https://assets.runware.ai/assets/inputs/98eb448a-7243-40ac-bde2-686387a6e84f.jpg'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "outputFormat": "PNG",
            "model": "runware:109@1",
            "settings": {
                "alphaMatting": True,
                "postProcessMask": True,
                "returnOnlyMask": True
            },
            "inputs": {
                "image": "https://assets.runware.ai/assets/inputs/98eb448a-7243-40ac-bde2-686387a6e84f.jpg"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "removeBackground",
      "taskUUID": "72a7aca9-1b0c-4990-8150-44ecdf6633ed",
      "outputFormat": "PNG",
      "model": "runware:109@1",
      "settings": {
        "alphaMatting": true,
        "postProcessMask": true,
        "returnOnlyMask": true
      },
      "inputs": {
        "image": "https://assets.runware.ai/assets/inputs/98eb448a-7243-40ac-bde2-686387a6e84f.jpg"
      }
    }
  ]'
runware run runware:109@1 \
  outputFormat=PNG \
  settings.alphaMatting=true \
  settings.postProcessMask=true \
  settings.returnOnlyMask=true \
  inputs.image=https://assets.runware.ai/assets/inputs/98eb448a-7243-40ac-bde2-686387a6e84f.jpg
{
  "taskType": "removeBackground",
  "taskUUID": "72a7aca9-1b0c-4990-8150-44ecdf6633ed",
  "outputFormat": "PNG",
  "model": "runware:109@1",
  "settings": {
    "alphaMatting": true,
    "postProcessMask": true,
    "returnOnlyMask": true
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/98eb448a-7243-40ac-bde2-686387a6e84f.jpg"
  }
}
Response
{
  "taskType": "imageBackgroundRemoval",
  "taskUUID": "72a7aca9-1b0c-4990-8150-44ecdf6633ed",
  "imageUUID": "d4dee9a4-4c6f-45cd-bc5e-00ff201f076e",
  "imageURL": "https://im.runware.ai/image/os/a05d22/ws/4/ii/d4dee9a4-4c6f-45cd-bc5e-00ff201f076e.png",
  "cost": 0.0013,
  "inputImageUUID": "8dc44e4f-314f-4aa9-9290-cafcfef46642"
}