YOLOv8n Person Seg
YOLOv8n Person Seg is a lightweight person segmentation model that generates black-and-white masks for detected people in an image. It is useful for subject-isolated inpainting, person-targeted enhancement, and automated mask generation where speed and low compute cost matter.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples4
CODE
Ready-to-use code snippets for common workflows
person-mask
Theremin Composer Press Headshot$0.0006~4s
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:35@4',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/dac19cf6-ba68-4199-a211-35731cfd0eff.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:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/dac19cf6-ba68-4199-a211-35731cfd0eff.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageMasking",
"taskUUID": "97862cb2-dbc0-48b4-9ddf-c3a850b274c9",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/dac19cf6-ba68-4199-a211-35731cfd0eff.jpg"
}
}
]'runware run runware:35@4 \
inputs.image=https://assets.runware.ai/assets/inputs/dac19cf6-ba68-4199-a211-35731cfd0eff.jpg{
"taskType": "imageMasking",
"taskUUID": "97862cb2-dbc0-48b4-9ddf-c3a850b274c9",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/dac19cf6-ba68-4199-a211-35731cfd0eff.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "97862cb2-dbc0-48b4-9ddf-c3a850b274c9",
"maskImageURL": "https://im.runware.ai/image/os/a01d21/ws/4/ii/d5add5a8-0f95-45d3-898d-52257daf67ff.jpg",
"detections": [
{
"x_min": 52,
"y_min": 122,
"x_max": 978,
"y_max": 1280
}
],
"cost": 0.0006,
"maskImageUUID": "d5add5a8-0f95-45d3-898d-52257daf67ff"
}person-mask
Regency Costume Virtual Try-On Mask$0.0006~3s
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:35@4',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/44cf1a2a-7297-4945-82c8-3225250ff7e1.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:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/44cf1a2a-7297-4945-82c8-3225250ff7e1.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageMasking",
"taskUUID": "e9974c03-a6c8-487f-9062-758bfc452dc3",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/44cf1a2a-7297-4945-82c8-3225250ff7e1.jpg"
}
}
]'runware run runware:35@4 \
inputs.image=https://assets.runware.ai/assets/inputs/44cf1a2a-7297-4945-82c8-3225250ff7e1.jpg{
"taskType": "imageMasking",
"taskUUID": "e9974c03-a6c8-487f-9062-758bfc452dc3",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/44cf1a2a-7297-4945-82c8-3225250ff7e1.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "e9974c03-a6c8-487f-9062-758bfc452dc3",
"maskImageURL": "https://im.runware.ai/image/os/a05d22/ws/4/ii/18f627a7-56ca-488f-b8a6-d6b2ae3d82f2.jpg",
"detections": [
{
"x_min": 316,
"y_min": 97,
"x_max": 741,
"y_max": 1278
}
],
"cost": 0.0006,
"maskImageUUID": "18f627a7-56ca-488f-b8a6-d6b2ae3d82f2"
}person-mask
Planetarium Presenter Background Cutout$0.0013~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:35@4',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/f1d010a6-4cb3-4358-8489-bbb868b27918.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:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f1d010a6-4cb3-4358-8489-bbb868b27918.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageMasking",
"taskUUID": "11de40fc-f571-4ef7-97b6-9a2aaa082024",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f1d010a6-4cb3-4358-8489-bbb868b27918.jpg"
}
}
]'runware run runware:35@4 \
inputs.image=https://assets.runware.ai/assets/inputs/f1d010a6-4cb3-4358-8489-bbb868b27918.jpg{
"taskType": "imageMasking",
"taskUUID": "11de40fc-f571-4ef7-97b6-9a2aaa082024",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f1d010a6-4cb3-4358-8489-bbb868b27918.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "11de40fc-f571-4ef7-97b6-9a2aaa082024",
"maskImageURL": "https://im.runware.ai/image/os/a04d20/ws/4/ii/bc99447f-301f-4c5d-8c85-0ba4137ff54c.jpg",
"detections": [
{
"x_min": 45,
"y_min": 125,
"x_max": 741,
"y_max": 1486
}
],
"cost": 0.0013,
"maskImageUUID": "bc99447f-301f-4c5d-8c85-0ba4137ff54c"
}person-mask
Desert Dance Festival Composite$0.0013~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:35@4',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/0d1c1839-1ab9-4089-86ec-54ffe2877597.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:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0d1c1839-1ab9-4089-86ec-54ffe2877597.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageMasking",
"taskUUID": "4e13aa9d-3327-4f4a-95e8-e61d597103c1",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0d1c1839-1ab9-4089-86ec-54ffe2877597.jpg"
}
}
]'runware run runware:35@4 \
inputs.image=https://assets.runware.ai/assets/inputs/0d1c1839-1ab9-4089-86ec-54ffe2877597.jpg{
"taskType": "imageMasking",
"taskUUID": "4e13aa9d-3327-4f4a-95e8-e61d597103c1",
"model": "runware:35@4",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0d1c1839-1ab9-4089-86ec-54ffe2877597.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "4e13aa9d-3327-4f4a-95e8-e61d597103c1",
"maskImageURL": "https://im.runware.ai/image/os/a03d21/ws/4/ii/144664b0-b7ff-45c2-ba85-d9eb7d76422e.jpg",
"detections": [
{
"x_min": 85,
"y_min": 34,
"x_max": 901,
"y_max": 1024
}
],
"cost": 0.0013,
"maskImageUUID": "144664b0-b7ff-45c2-ba85-d9eb7d76422e"
}