ControlNet Preprocess Canny
ControlNet Preprocess Canny converts an input image into a high-contrast Canny edge map for ControlNet conditioning. It is best suited to workflows that need clear object boundaries, strong silhouette retention, and tightly constrained structure during guided image generation or editing.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples4
CODE
Ready-to-use code snippets for common workflows
Porcelain Tea Service Arrangement

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@canny',
settings: {
lowThresholdCanny: 70,
highThresholdCanny: 190
},
inputs: {
image: 'https://assets.runware.ai/assets/inputs/fee1a1d5-d8f1-4224-a7d7-44bb8f29f591.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@canny",
"settings": {
"lowThresholdCanny": 70,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fee1a1d5-d8f1-4224-a7d7-44bb8f29f591.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": "3168ff38-89cd-449b-8695-7f0df51af21f",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 70,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fee1a1d5-d8f1-4224-a7d7-44bb8f29f591.jpg"
}
}
]'runware run runware:controlnet-preprocess@canny \
settings.lowThresholdCanny=70 \
settings.highThresholdCanny=190 \
inputs.image=https://assets.runware.ai/assets/inputs/fee1a1d5-d8f1-4224-a7d7-44bb8f29f591.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "3168ff38-89cd-449b-8695-7f0df51af21f",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 70,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fee1a1d5-d8f1-4224-a7d7-44bb8f29f591.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "3168ff38-89cd-449b-8695-7f0df51af21f",
"guideImageURL": "https://im.runware.ai/image/os/a08dlim3/ws/3/ii/7dfa23da-ce7d-4d7b-88e5-52e83c3d36a8.jpg",
"cost": 0.0006,
"guideImageUUID": "7dfa23da-ce7d-4d7b-88e5-52e83c3d36a8",
"inputImageUUID": "681ec270-83c0-451d-a4db-12b455df00d9"
}Mechanical Peacock Tail Blueprint

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@canny',
settings: {
lowThresholdCanny: 50,
highThresholdCanny: 160
},
inputs: {
image: 'https://assets.runware.ai/assets/inputs/92f673cc-2c3c-41fb-b3a5-c4a29fb863ff.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@canny",
"settings": {
"lowThresholdCanny": 50,
"highThresholdCanny": 160
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/92f673cc-2c3c-41fb-b3a5-c4a29fb863ff.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": "e3cddd6d-b206-4724-b34d-2a3af7ad8e81",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 50,
"highThresholdCanny": 160
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/92f673cc-2c3c-41fb-b3a5-c4a29fb863ff.jpg"
}
}
]'runware run runware:controlnet-preprocess@canny \
settings.lowThresholdCanny=50 \
settings.highThresholdCanny=160 \
inputs.image=https://assets.runware.ai/assets/inputs/92f673cc-2c3c-41fb-b3a5-c4a29fb863ff.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "e3cddd6d-b206-4724-b34d-2a3af7ad8e81",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 50,
"highThresholdCanny": 160
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/92f673cc-2c3c-41fb-b3a5-c4a29fb863ff.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "e3cddd6d-b206-4724-b34d-2a3af7ad8e81",
"guideImageURL": "https://im.runware.ai/image/os/a03d21/ws/3/ii/0ffe6036-e273-4eef-981b-5e35c5fbebb1.jpg",
"cost": 0.0006,
"guideImageUUID": "0ffe6036-e273-4eef-981b-5e35c5fbebb1",
"inputImageUUID": "763e276a-91c1-4192-a995-0e8f9b608649"
}Ornate Pipe Organ Facade

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@canny',
settings: {
lowThresholdCanny: 80,
highThresholdCanny: 190
},
inputs: {
image: 'https://assets.runware.ai/assets/inputs/fe5e44a9-08e9-45be-9295-5cc443b3be06.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@canny",
"settings": {
"lowThresholdCanny": 80,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fe5e44a9-08e9-45be-9295-5cc443b3be06.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": "9fb53589-878c-4443-90bf-061f89931ac1",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 80,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fe5e44a9-08e9-45be-9295-5cc443b3be06.jpg"
}
}
]'runware run runware:controlnet-preprocess@canny \
settings.lowThresholdCanny=80 \
settings.highThresholdCanny=190 \
inputs.image=https://assets.runware.ai/assets/inputs/fe5e44a9-08e9-45be-9295-5cc443b3be06.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "9fb53589-878c-4443-90bf-061f89931ac1",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 80,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/fe5e44a9-08e9-45be-9295-5cc443b3be06.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "9fb53589-878c-4443-90bf-061f89931ac1",
"guideImageURL": "https://im.runware.ai/image/os/a07dlim3/ws/3/ii/ab9744e7-3c8e-4107-b128-f1956b8d7d32.jpg",
"cost": 0.0006,
"guideImageUUID": "ab9744e7-3c8e-4107-b128-f1956b8d7d32",
"inputImageUUID": "5ae42ec8-2d97-479e-b19c-1d7cf38f6292"
}Paperfold Dragon Street Sculpture

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@canny',
settings: {
lowThresholdCanny: 80,
highThresholdCanny: 190
},
inputs: {
image: 'https://assets.runware.ai/assets/inputs/e6b4790b-9e03-4574-91d1-abf57d6b0c1b.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@canny",
"settings": {
"lowThresholdCanny": 80,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e6b4790b-9e03-4574-91d1-abf57d6b0c1b.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": "963bfadc-61cf-4e50-a90f-2ae9b4ab1cda",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 80,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e6b4790b-9e03-4574-91d1-abf57d6b0c1b.jpg"
}
}
]'runware run runware:controlnet-preprocess@canny \
settings.lowThresholdCanny=80 \
settings.highThresholdCanny=190 \
inputs.image=https://assets.runware.ai/assets/inputs/e6b4790b-9e03-4574-91d1-abf57d6b0c1b.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "963bfadc-61cf-4e50-a90f-2ae9b4ab1cda",
"model": "runware:controlnet-preprocess@canny",
"settings": {
"lowThresholdCanny": 80,
"highThresholdCanny": 190
},
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e6b4790b-9e03-4574-91d1-abf57d6b0c1b.jpg"
}
}{
"taskType": "imageControlNetPreProcess",
"taskUUID": "963bfadc-61cf-4e50-a90f-2ae9b4ab1cda",
"guideImageURL": "https://im.runware.ai/image/os/a06dlim3/ws/3/ii/28acbf79-ad81-437b-86e3-974fee8158e4.jpg",
"cost": 0.0006,
"guideImageUUID": "28acbf79-ad81-437b-86e3-974fee8158e4",
"inputImageUUID": "8e42795e-f465-4719-9931-ebc4e7b1efc8"
}