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
Origami Airship Harbor Hangar

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/594f6847-7b69-49d1-aaf6-350f3991fb22.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/594f6847-7b69-49d1-aaf6-350f3991fb22.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": "9ec210ee-42a0-4757-9807-a79dd07d8207",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/594f6847-7b69-49d1-aaf6-350f3991fb22.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/594f6847-7b69-49d1-aaf6-350f3991fb22.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "9ec210ee-42a0-4757-9807-a79dd07d8207",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/594f6847-7b69-49d1-aaf6-350f3991fb22.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "9ec210ee-42a0-4757-9807-a79dd07d8207",
"guideImageURL": "https://im.runware.ai/image/os/a04d20/ws/3/ii/2501f853-b455-4f97-ba56-4581f57e0128.jpg",
"cost": 0.0006,
"guideImageUUID": "2501f853-b455-4f97-ba56-4581f57e0128",
"inputImageUUID": "a7e1e0a6-b64c-4d54-96a0-af37d7c2d30f"
}Porcelain Crab Tailor Tableau

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/786180e7-1b22-4b1f-bc11-963e323e3f85.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/786180e7-1b22-4b1f-bc11-963e323e3f85.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": "26c7a8be-49b7-4ec9-b6f4-6c67431da672",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/786180e7-1b22-4b1f-bc11-963e323e3f85.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/786180e7-1b22-4b1f-bc11-963e323e3f85.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "26c7a8be-49b7-4ec9-b6f4-6c67431da672",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/786180e7-1b22-4b1f-bc11-963e323e3f85.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "26c7a8be-49b7-4ec9-b6f4-6c67431da672",
"guideImageURL": "https://im.runware.ai/image/os/a08dlim3/ws/3/ii/d9cf6bb4-65ad-4e29-91ca-d7fa9acabfac.jpg",
"cost": 0.0006,
"guideImageUUID": "d9cf6bb4-65ad-4e29-91ca-d7fa9acabfac",
"inputImageUUID": "918d7148-db9a-4de2-8e12-29566b2290ac"
}Ornate Moth Courier Bicycle

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/5b46286b-ed62-4dbc-a39e-d9541e929a6e.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/5b46286b-ed62-4dbc-a39e-d9541e929a6e.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": "f361a7f5-9452-4d8d-b6c5-42e9d1e30722",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/5b46286b-ed62-4dbc-a39e-d9541e929a6e.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/5b46286b-ed62-4dbc-a39e-d9541e929a6e.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "f361a7f5-9452-4d8d-b6c5-42e9d1e30722",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/5b46286b-ed62-4dbc-a39e-d9541e929a6e.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "f361a7f5-9452-4d8d-b6c5-42e9d1e30722",
"guideImageURL": "https://im.runware.ai/image/os/a08dlim3/ws/3/ii/9f98d0d1-3790-40de-89fe-574ba303e31d.jpg",
"cost": 0.0013,
"guideImageUUID": "9f98d0d1-3790-40de-89fe-574ba303e31d",
"inputImageUUID": "eccdf08b-4bf9-4fb2-a6ef-1da20092ab3e"
}Ceremonial Rhino Armor Study

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/7d513b9d-ef78-4939-92fa-ba7152f5aead.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/7d513b9d-ef78-4939-92fa-ba7152f5aead.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": "2b8fbbe9-f4d6-43b1-91fe-b370f35a3392",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7d513b9d-ef78-4939-92fa-ba7152f5aead.jpg"
}
}
]'runware run runware:controlnet-preprocess@lineart \
inputs.image=https://assets.runware.ai/assets/inputs/7d513b9d-ef78-4939-92fa-ba7152f5aead.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "2b8fbbe9-f4d6-43b1-91fe-b370f35a3392",
"model": "runware:controlnet-preprocess@lineart",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/7d513b9d-ef78-4939-92fa-ba7152f5aead.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "2b8fbbe9-f4d6-43b1-91fe-b370f35a3392",
"guideImageURL": "https://im.runware.ai/image/os/a09dlim3/ws/3/ii/f34ef9f1-d2c6-4b29-9bb7-182f0bf9d433.jpg",
"cost": 0.0006,
"guideImageUUID": "f34ef9f1-d2c6-4b29-9bb7-182f0bf9d433",
"inputImageUUID": "248a4d39-3981-47d8-ac8d-1fc84778d189"
}