ControlNet API Overview
Generate images guided by edge maps, depth maps, poses, and other control signals using ControlNet via the Stable Diffusion API.
What is ControlNet?
ControlNet is a neural network architecture that adds spatial conditioning to Stable Diffusion. Instead of generating from prompt alone, ControlNet uses an additional image (edge map, depth, pose, scribble) to guide composition.
Supported control types
- Canny — edge detection
- Depth — depth-aware composition
- Pose — human pose preservation
- Scribble — sketch-to-image
- Segmentation — semantic guidance
- Lineart — anime lineart
- MLSD — straight-line detection (architecture)
- Normal — surface normals
Endpoints
- ControlNet Main — primary generation endpoint
- ControlNet Inpaint — guided inpainting
Quickstart
curl -X POST 'https://stablediffusionapi.com/api/v5/controlnet' \
-H 'Content-Type: application/json' \
-d '{
"key": "YOUR_API_KEY",
"controlnet_model": "canny",
"init_image": "https://example.com/edge.png",
"prompt": "a futuristic city, neon lights"
}'