ControlNet Preprocess Lineart
ControlNet Preprocess Lineart extracts simplified line art from an input image for ControlNet conditioning. It is useful when the goal is to preserve contours, composition, and object shapes while translating the result into illustration, concept art, or other stylized outputs.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples4
CODE
Ready-to-use code snippets for common workflows
lineart-extraction
Avalanche Patrol Portrait Line-Art Guide$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:controlnet-preprocess@lineart',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/93f868c7-24a9-41aa-98d1-5d4c798852f6.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:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/93f868c7-24a9-41aa-98d1-5d4c798852f6.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "controlNetPreprocess",
"taskUUID": "a6056883-e4f8-4da5-a8b7-954a29212dc4",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/93f868c7-24a9-41aa-98d1-5d4c798852f6.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/93f868c7-24a9-41aa-98d1-5d4c798852f6.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "a6056883-e4f8-4da5-a8b7-954a29212dc4",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/93f868c7-24a9-41aa-98d1-5d4c798852f6.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "a6056883-e4f8-4da5-a8b7-954a29212dc4",
"guideImageURL": "https://im.runware.ai/image/os/a02d21/ws/3/ii/c7390396-dd36-4a53-88c0-24f6eadfeae4.jpg",
"cost": 0.0006,
"guideImageUUID": "c7390396-dd36-4a53-88c0-24f6eadfeae4",
"inputImageUUID": "adced96a-0e7f-4209-82ce-3b9b8849d325"
}lineart-extraction
Deep-Sea Exhibit Panorama Guide$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:controlnet-preprocess@lineart',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/4692a7a8-3fb2-4786-9d47-89c71c366711.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:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/4692a7a8-3fb2-4786-9d47-89c71c366711.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "controlNetPreprocess",
"taskUUID": "6f599477-81b2-4731-a465-5814210a5d8f",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/4692a7a8-3fb2-4786-9d47-89c71c366711.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/4692a7a8-3fb2-4786-9d47-89c71c366711.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "6f599477-81b2-4731-a465-5814210a5d8f",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/4692a7a8-3fb2-4786-9d47-89c71c366711.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "6f599477-81b2-4731-a465-5814210a5d8f",
"guideImageURL": "https://im.runware.ai/image/os/a07dlim3/ws/3/ii/bf5dafe0-c40f-494e-aa54-cf1b63bb1e7e.jpg",
"cost": 0.0006,
"guideImageUUID": "bf5dafe0-c40f-494e-aa54-cf1b63bb1e7e",
"inputImageUUID": "207d1906-69a8-49de-a4ce-dcf8f8547e0f"
}lineart-extraction
Hydroelectric Mural Expansion Guide$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:controlnet-preprocess@lineart',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/195cc133-eb24-4eb0-a546-29b189c9c035.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:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/195cc133-eb24-4eb0-a546-29b189c9c035.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "controlNetPreprocess",
"taskUUID": "0b25ed53-f0da-4d6b-b581-d3f1c35923fa",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/195cc133-eb24-4eb0-a546-29b189c9c035.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/195cc133-eb24-4eb0-a546-29b189c9c035.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "0b25ed53-f0da-4d6b-b581-d3f1c35923fa",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/195cc133-eb24-4eb0-a546-29b189c9c035.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "0b25ed53-f0da-4d6b-b581-d3f1c35923fa",
"guideImageURL": "https://im.runware.ai/image/os/a01d21/ws/3/ii/3aea834d-e018-4978-bd5f-ffcba60b3bf8.jpg",
"cost": 0.0006,
"guideImageUUID": "3aea834d-e018-4978-bd5f-ffcba60b3bf8",
"inputImageUUID": "f38e5058-2e24-44cb-b11b-08c2032eb511"
}lineart-extraction
Arborist Helmet Colorway Line Guide$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:controlnet-preprocess@lineart',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/c23b5df6-f1e8-4faf-bcc9-3bac905fff1c.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:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/c23b5df6-f1e8-4faf-bcc9-3bac905fff1c.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "controlNetPreprocess",
"taskUUID": "75b746c3-2853-4921-83de-a2c76f71a45e",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/c23b5df6-f1e8-4faf-bcc9-3bac905fff1c.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/c23b5df6-f1e8-4faf-bcc9-3bac905fff1c.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "75b746c3-2853-4921-83de-a2c76f71a45e",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/c23b5df6-f1e8-4faf-bcc9-3bac905fff1c.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "75b746c3-2853-4921-83de-a2c76f71a45e",
"guideImageURL": "https://im.runware.ai/image/os/a05d22/ws/3/ii/a65422cf-6c6e-43d9-9d54-af3b9a9229fb.jpg",
"cost": 0.0006,
"guideImageUUID": "a65422cf-6c6e-43d9-9d54-af3b9a9229fb",
"inputImageUUID": "6a338031-f085-4e79-a2d2-b997d92527d1"
}