YOLOv8s Person Seg
YOLOv8s Person Seg is a person segmentation model that produces black-and-white masks for detected human subjects with stronger precision than smaller variants. It is better suited to workflows that need cleaner subject contours for inpainting, compositing, or detail enhancement.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples4
CODE
Ready-to-use code snippets for common workflows
person-mask
Perfumer Portrait Outpaint Protection Mask$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@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/7dbd5dc2-564c-44ef-b876-0a85ff05359d.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@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7dbd5dc2-564c-44ef-b876-0a85ff05359d.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": "e409e823-87bf-4104-8c60-e3afe4188b90",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7dbd5dc2-564c-44ef-b876-0a85ff05359d.jpg"
}
}
]'runware run runware:35@5 \
inputs.image=https://assets.runware.ai/assets/inputs/7dbd5dc2-564c-44ef-b876-0a85ff05359d.jpg{
"taskType": "imageMasking",
"taskUUID": "e409e823-87bf-4104-8c60-e3afe4188b90",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7dbd5dc2-564c-44ef-b876-0a85ff05359d.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "e409e823-87bf-4104-8c60-e3afe4188b90",
"maskImageURL": "https://im.runware.ai/image/os/a01d21/ws/4/ii/055affe4-46e7-4a18-a7e5-ee98dc2f4f6a.jpg",
"detections": [
{
"x_min": 302,
"y_min": 161,
"x_max": 912,
"y_max": 1344
}
],
"cost": 0.0006,
"maskImageUUID": "055affe4-46e7-4a18-a7e5-ee98dc2f4f6a"
}person-mask
Artistic Swimmer Campaign 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:35@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/1cd84ac1-c1c4-430b-9647-3b3f170da27e.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@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/1cd84ac1-c1c4-430b-9647-3b3f170da27e.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": "abbd932c-d605-41be-a1e8-d44839d4ed19",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/1cd84ac1-c1c4-430b-9647-3b3f170da27e.jpg"
}
}
]'runware run runware:35@5 \
inputs.image=https://assets.runware.ai/assets/inputs/1cd84ac1-c1c4-430b-9647-3b3f170da27e.jpg{
"taskType": "imageMasking",
"taskUUID": "abbd932c-d605-41be-a1e8-d44839d4ed19",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/1cd84ac1-c1c4-430b-9647-3b3f170da27e.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "abbd932c-d605-41be-a1e8-d44839d4ed19",
"maskImageURL": "https://im.runware.ai/image/os/a04d20/ws/4/ii/6072220e-0f96-4e68-8881-f4c6b9a88fd1.jpg",
"detections": [
{
"x_min": 221,
"y_min": 64,
"x_max": 915,
"y_max": 1304
}
],
"cost": 0.0006,
"maskImageUUID": "6072220e-0f96-4e68-8881-f4c6b9a88fd1"
}person-mask
Mariachi Lineup Removal Masks$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@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/3988af7d-3316-42d6-af31-0bb4d4508d31.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@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/3988af7d-3316-42d6-af31-0bb4d4508d31.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": "f7e3b147-0dce-4d2d-a40c-b7a9b097c5a7",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/3988af7d-3316-42d6-af31-0bb4d4508d31.jpg"
}
}
]'runware run runware:35@5 \
inputs.image=https://assets.runware.ai/assets/inputs/3988af7d-3316-42d6-af31-0bb4d4508d31.jpg{
"taskType": "imageMasking",
"taskUUID": "f7e3b147-0dce-4d2d-a40c-b7a9b097c5a7",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/3988af7d-3316-42d6-af31-0bb4d4508d31.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "f7e3b147-0dce-4d2d-a40c-b7a9b097c5a7",
"maskImageURL": "https://im.runware.ai/image/os/a02d21/ws/4/ii/d0d52826-6466-4665-8038-0c2c1de3bab3.jpg",
"detections": [
{
"x_min": 98,
"y_min": 264,
"x_max": 370,
"y_max": 975
},
{
"x_min": 351,
"y_min": 217,
"x_max": 625,
"y_max": 974
},
{
"x_min": 615,
"y_min": 273,
"x_max": 925,
"y_max": 977
}
],
"cost": 0.0013,
"maskImageUUID": "d0d52826-6466-4665-8038-0c2c1de3bab3"
}person-mask
Wildland Crew Member Addition Mask$0.0013~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:35@5',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/d933d615-f4f1-4d98-8179-648cfcca437f.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@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/d933d615-f4f1-4d98-8179-648cfcca437f.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": "77135a76-6f13-4df9-b223-de186f722401",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/d933d615-f4f1-4d98-8179-648cfcca437f.jpg"
}
}
]'runware run runware:35@5 \
inputs.image=https://assets.runware.ai/assets/inputs/d933d615-f4f1-4d98-8179-648cfcca437f.jpg{
"taskType": "imageMasking",
"taskUUID": "77135a76-6f13-4df9-b223-de186f722401",
"model": "runware:35@5",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/d933d615-f4f1-4d98-8179-648cfcca437f.jpg"
}
}Response
{
"taskType": "imageMasking",
"taskUUID": "77135a76-6f13-4df9-b223-de186f722401",
"maskImageURL": "https://im.runware.ai/image/os/a08dlim3/ws/4/ii/64c2f2ac-ff5c-4385-9c19-ad76656ba4f8.jpg",
"detections": [
{
"x_min": 222,
"y_min": 110,
"x_max": 780,
"y_max": 1522
}
],
"cost": 0.0013,
"maskImageUUID": "64c2f2ac-ff5c-4385-9c19-ad76656ba4f8"
}