ControlNet Preprocess Depth
ControlNet Preprocess Depth estimates a depth map from an input image for ControlNet conditioning. It is useful when the goal is to preserve scene layout, foreground-background separation, camera perspective, and overall 3D spatial structure while changing style or content.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples4
CODE
Ready-to-use code snippets for common workflows
depth-estimation
Hatchery Brochure Cleanup Depth Guide$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:controlnet-preprocess@depth',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/0267126a-7a6d-4a6d-9907-326604fdc859.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@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0267126a-7a6d-4a6d-9907-326604fdc859.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": "6af7964b-3d9e-4e6d-b17c-8ab3749cddc5",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0267126a-7a6d-4a6d-9907-326604fdc859.jpg"
}
}
]'runware run runware:controlnet-preprocess@depth \
inputs.image=https://assets.runware.ai/assets/inputs/0267126a-7a6d-4a6d-9907-326604fdc859.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "6af7964b-3d9e-4e6d-b17c-8ab3749cddc5",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0267126a-7a6d-4a6d-9907-326604fdc859.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "6af7964b-3d9e-4e6d-b17c-8ab3749cddc5",
"guideImageURL": "https://im.runware.ai/image/os/a02d21/ws/3/ii/6719c07d-4831-4903-9244-1fd92b680ad4.jpg",
"cost": 0.0013,
"guideImageUUID": "6719c07d-4831-4903-9244-1fd92b680ad4",
"inputImageUUID": "ea50a583-24d4-48f1-a9a6-161ff5f73b5b"
}depth-estimation
Forensic Entomologist Portrait Depth Guide$0.0013~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@depth',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/f88d0cf8-ba34-4f21-aa21-cbf3e27d040e.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@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f88d0cf8-ba34-4f21-aa21-cbf3e27d040e.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": "357a8984-2ce2-478b-af9d-533ee3399fbb",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f88d0cf8-ba34-4f21-aa21-cbf3e27d040e.jpg"
}
}
]'runware run runware:controlnet-preprocess@depth \
inputs.image=https://assets.runware.ai/assets/inputs/f88d0cf8-ba34-4f21-aa21-cbf3e27d040e.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "357a8984-2ce2-478b-af9d-533ee3399fbb",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/f88d0cf8-ba34-4f21-aa21-cbf3e27d040e.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "357a8984-2ce2-478b-af9d-533ee3399fbb",
"guideImageURL": "https://im.runware.ai/image/os/a10dlim3/ws/3/ii/f605fa76-4f2e-4db5-8d38-ddc1deddff11.jpg",
"cost": 0.0013,
"guideImageUUID": "f605fa76-4f2e-4db5-8d38-ddc1deddff11",
"inputImageUUID": "7f9930d2-f4e6-4b01-aa42-96604dfc8cb6"
}depth-estimation
Diving Suit Background Replacement Guide$0.0019~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:controlnet-preprocess@depth',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/555b12d9-5bef-4900-a40b-017042ea27d8.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@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/555b12d9-5bef-4900-a40b-017042ea27d8.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": "48c7181b-e343-4366-8239-95a52123928b",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/555b12d9-5bef-4900-a40b-017042ea27d8.jpg"
}
}
]'runware run runware:controlnet-preprocess@depth \
inputs.image=https://assets.runware.ai/assets/inputs/555b12d9-5bef-4900-a40b-017042ea27d8.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "48c7181b-e343-4366-8239-95a52123928b",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/555b12d9-5bef-4900-a40b-017042ea27d8.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "48c7181b-e343-4366-8239-95a52123928b",
"guideImageURL": "https://im.runware.ai/image/os/a10dlim3/ws/3/ii/c96e55a4-582e-4bf0-a3ca-965e74747834.jpg",
"cost": 0.0019,
"guideImageUUID": "c96e55a4-582e-4bf0-a3ca-965e74747834",
"inputImageUUID": "645d6740-d7bb-46bf-9ac6-e8005f5ae5c9"
}depth-estimation
Polar Night Plant Depth Guide$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:controlnet-preprocess@depth',
inputs: {
image: 'https://assets.runware.ai/assets/inputs/2ad90c43-da02-4978-aafc-3afe14bbe702.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@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2ad90c43-da02-4978-aafc-3afe14bbe702.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": "4a9edaa2-9700-4401-8c6f-596c33619bbb",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2ad90c43-da02-4978-aafc-3afe14bbe702.jpg"
}
}
]'runware run runware:controlnet-preprocess@depth \
inputs.image=https://assets.runware.ai/assets/inputs/2ad90c43-da02-4978-aafc-3afe14bbe702.jpg{
"taskType": "controlNetPreprocess",
"taskUUID": "4a9edaa2-9700-4401-8c6f-596c33619bbb",
"model": "runware:controlnet-preprocess@depth",
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2ad90c43-da02-4978-aafc-3afe14bbe702.jpg"
}
}Response
{
"taskType": "imageControlNetPreProcess",
"taskUUID": "4a9edaa2-9700-4401-8c6f-596c33619bbb",
"guideImageURL": "https://im.runware.ai/image/os/a08dlim3/ws/3/ii/6790c818-a8a1-40f1-9ad1-7dc872715ff7.jpg",
"cost": 0.0013,
"guideImageUUID": "6790c818-a8a1-40f1-9ad1-7dc872715ff7",
"inputImageUUID": "c36d629f-ab67-43cb-8eb9-b75a02215fd0"
}