BiRefNet Portrait
BiRefNet Portrait is tuned for human subject segmentation, focusing on accurate extraction of faces and bodies with clean contours for portrait-centric workflows.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples4
CODE
Ready-to-use code snippets for common workflows
remove-background
Horologist Conference Portrait Cutout$0.0006~10s
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@10',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/5c869d7a-8654-4557-aa2b-f90e21f8da1c.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@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/5c869d7a-8654-4557-aa2b-f90e21f8da1c.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": "71e8d973-9e82-46f0-bba2-07d7f518ebf6",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/5c869d7a-8654-4557-aa2b-f90e21f8da1c.jpg"
}
}
]'runware run runware:112@10 \
inputs.image=https://assets.runware.ai/assets/inputs/5c869d7a-8654-4557-aa2b-f90e21f8da1c.jpg{
"taskType": "removeBackground",
"taskUUID": "71e8d973-9e82-46f0-bba2-07d7f518ebf6",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/5c869d7a-8654-4557-aa2b-f90e21f8da1c.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "71e8d973-9e82-46f0-bba2-07d7f518ebf6",
"imageUUID": "4412048a-946e-4bed-a518-cbc1f74252c1",
"imageURL": "https://im.runware.ai/image/os/a08dlim3/ws/5/ii/4412048a-946e-4bed-a518-cbc1f74252c1.png",
"cost": 0.0006,
"inputImageUUID": "beae7d2b-dad7-4ad7-b738-d2096f90eb3d"
}remove-background
Aluminized Foundry Suit Catalog 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@10',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/203dfe91-f7f5-45bd-b0e2-a15d74a1890f.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@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/203dfe91-f7f5-45bd-b0e2-a15d74a1890f.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": "3cd6da94-071b-47f4-b685-0d3e5868e1cb",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/203dfe91-f7f5-45bd-b0e2-a15d74a1890f.jpg"
}
}
]'runware run runware:112@10 \
inputs.image=https://assets.runware.ai/assets/inputs/203dfe91-f7f5-45bd-b0e2-a15d74a1890f.jpg{
"taskType": "removeBackground",
"taskUUID": "3cd6da94-071b-47f4-b685-0d3e5868e1cb",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/203dfe91-f7f5-45bd-b0e2-a15d74a1890f.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "3cd6da94-071b-47f4-b685-0d3e5868e1cb",
"imageUUID": "90c7a4a5-df4b-4c83-ad6b-3a2011ef2f18",
"imageURL": "https://im.runware.ai/image/os/a04d20/ws/5/ii/90c7a4a5-df4b-4c83-ad6b-3a2011ef2f18.png",
"cost": 0.0006,
"inputImageUUID": "153c80af-d904-4091-b6a4-6023e92b9a0e"
}remove-background
Wheelchair Racer Campaign 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@10',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/ed908f93-cad4-474b-af98-ab55b61478d7.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@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/ed908f93-cad4-474b-af98-ab55b61478d7.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": "7ea008a8-641f-4f62-b705-52d2a6c8ad5d",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/ed908f93-cad4-474b-af98-ab55b61478d7.jpg"
}
}
]'runware run runware:112@10 \
inputs.image=https://assets.runware.ai/assets/inputs/ed908f93-cad4-474b-af98-ab55b61478d7.jpg{
"taskType": "removeBackground",
"taskUUID": "7ea008a8-641f-4f62-b705-52d2a6c8ad5d",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/ed908f93-cad4-474b-af98-ab55b61478d7.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "7ea008a8-641f-4f62-b705-52d2a6c8ad5d",
"imageUUID": "71e88f2e-5328-41a8-8d30-a83918d3e741",
"imageURL": "https://im.runware.ai/image/os/a08dlim3/ws/5/ii/71e88f2e-5328-41a8-8d30-a83918d3e741.png",
"cost": 0.0006,
"inputImageUUID": "a370ece3-7ad6-4c38-9c5b-7f76bb5fcfce"
}remove-background
Planetarium Educator Background 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@10',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/f43e5f58-79b5-4449-9c0f-2c5684e88479.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@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f43e5f58-79b5-4449-9c0f-2c5684e88479.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": "8172538d-c605-491b-90c8-855222d72a12",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f43e5f58-79b5-4449-9c0f-2c5684e88479.jpg"
}
}
]'runware run runware:112@10 \
inputs.image=https://assets.runware.ai/assets/inputs/f43e5f58-79b5-4449-9c0f-2c5684e88479.jpg{
"taskType": "removeBackground",
"taskUUID": "8172538d-c605-491b-90c8-855222d72a12",
"model": "runware:112@10",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f43e5f58-79b5-4449-9c0f-2c5684e88479.jpg"
}
}Response
{
"taskType": "imageBackgroundRemoval",
"taskUUID": "8172538d-c605-491b-90c8-855222d72a12",
"imageUUID": "72bfbba5-d108-43f6-ac98-eefd50e9abd5",
"imageURL": "https://im.runware.ai/image/os/a07dlim3/ws/5/ii/72bfbba5-d108-43f6-ac98-eefd50e9abd5.png",
"cost": 0.0006,
"inputImageUUID": "720a32a5-51f4-4e25-8a30-87b42f36988d"
}