BiRefNet General
BiRefNet General is trained for broad segmentation use cases, providing stable and consistent object masks across a wide variety of image domains without task-specific specialization.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples4
CODE
Ready-to-use code snippets for common workflows
remove-background
Hand-Spliced Marine Fender Cutout$0.0006~5s
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:112@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/7520be84-0435-45cd-a5a4-5727dbc9d8c5.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:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7520be84-0435-45cd-a5a4-5727dbc9d8c5.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": "228fddae-e876-45c6-a5b6-7ee6aebb7a13",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7520be84-0435-45cd-a5a4-5727dbc9d8c5.jpg"
}
}
]'runware run runware:112@5 \
inputs.image=https://assets.runware.ai/assets/inputs/7520be84-0435-45cd-a5a4-5727dbc9d8c5.jpg{
"taskType": "removeBackground",
"taskUUID": "228fddae-e876-45c6-a5b6-7ee6aebb7a13",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7520be84-0435-45cd-a5a4-5727dbc9d8c5.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "228fddae-e876-45c6-a5b6-7ee6aebb7a13",
"imageUUID": "b8078508-5121-482b-97f5-3a108be5ff1f",
"imageURL": "https://im.runware.ai/image/os/a03d21/ws/5/ii/b8078508-5121-482b-97f5-3a108be5ff1f.png",
"cost": 0.0006,
"inputImageUUID": "38e912f7-7b3d-4c2e-a81e-996fc7838e28"
}remove-background
Geothermal Engineer Press Headshot$0.0006~5s
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:112@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/e270981b-60de-43d1-8fc1-eae2999671e8.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:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e270981b-60de-43d1-8fc1-eae2999671e8.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": "5226a621-7274-45b1-a114-0959de34e125",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e270981b-60de-43d1-8fc1-eae2999671e8.jpg"
}
}
]'runware run runware:112@5 \
inputs.image=https://assets.runware.ai/assets/inputs/e270981b-60de-43d1-8fc1-eae2999671e8.jpg{
"taskType": "removeBackground",
"taskUUID": "5226a621-7274-45b1-a114-0959de34e125",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e270981b-60de-43d1-8fc1-eae2999671e8.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "5226a621-7274-45b1-a114-0959de34e125",
"imageUUID": "64b29c4e-d520-4cc7-88fd-15dcc698bdae",
"imageURL": "https://im.runware.ai/image/os/a03d21/ws/5/ii/64b29c4e-d520-4cc7-88fd-15dcc698bdae.png",
"cost": 0.0006,
"inputImageUUID": "a85d2971-6f22-444f-bb1b-f3c7f3853f0d"
}remove-background
Beekeeper Orchard Background-Swap Cutout$0.0006~6s
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:112@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/bd6dd22d-c14b-488c-b7b2-9573cf1cb014.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:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/bd6dd22d-c14b-488c-b7b2-9573cf1cb014.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": "59204411-2975-427c-aae1-145c76ed7cdb",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/bd6dd22d-c14b-488c-b7b2-9573cf1cb014.jpg"
}
}
]'runware run runware:112@5 \
inputs.image=https://assets.runware.ai/assets/inputs/bd6dd22d-c14b-488c-b7b2-9573cf1cb014.jpg{
"taskType": "removeBackground",
"taskUUID": "59204411-2975-427c-aae1-145c76ed7cdb",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/bd6dd22d-c14b-488c-b7b2-9573cf1cb014.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "59204411-2975-427c-aae1-145c76ed7cdb",
"imageUUID": "e5927433-7856-462c-abc5-19224b0f6016",
"imageURL": "https://im.runware.ai/image/os/a02d21/ws/5/ii/e5927433-7856-462c-abc5-19224b0f6016.png",
"cost": 0.0006,
"inputImageUUID": "17d52554-37af-49c8-828a-11d5387825d1"
}remove-background
Circus Portrait Restyle Cutout$0.0006~7s
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:112@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/fad3354d-2cc0-4436-a4b6-bc4979d37eac.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:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fad3354d-2cc0-4436-a4b6-bc4979d37eac.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": "fd658b61-4b9a-460c-b942-72dc4ca4cd1d",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fad3354d-2cc0-4436-a4b6-bc4979d37eac.jpg"
}
}
]'runware run runware:112@5 \
inputs.image=https://assets.runware.ai/assets/inputs/fad3354d-2cc0-4436-a4b6-bc4979d37eac.jpg{
"taskType": "removeBackground",
"taskUUID": "fd658b61-4b9a-460c-b942-72dc4ca4cd1d",
"model": "runware:112@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fad3354d-2cc0-4436-a4b6-bc4979d37eac.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "fd658b61-4b9a-460c-b942-72dc4ca4cd1d",
"imageUUID": "fa2af59a-b39b-4d4e-9013-02fd878e165f",
"imageURL": "https://im.runware.ai/image/os/a07dlim3/ws/5/ii/fa2af59a-b39b-4d4e-9013-02fd878e165f.png",
"cost": 0.0006,
"inputImageUUID": "4ba4e4e6-80c1-4eac-9dd0-e5811b16b92d"
}