mask_image
in the request body and use the controlnet_model
parameter with “inpaint” value.
Request
Send aPOST
request to below endpoint.
Models
ControlNet API using ControlNet 1.1 as the default: Supported ControlNet Models:canny
, tile
, depth
, blur
, pose
, gray
and low_quality
.ControlNet Model/Type | SDXL | SD1.5 | FluxDev |
---|---|---|---|
Canny | Yes | Yes | Yes |
Tile | Yes | Yes | Yes |
Depth | Yes | Yes | Yes |
Blur | Yes | Yes | Yes |
Pose | Yes | Yes | Yes |
MLSD | Yes | Yes | No |
Lineart | Yes | Yes | No |
HED | Yes | Yes | No |
Normal | Yes | Yes | No |
OpenPose | Yes | Yes | No |
Segmentation | Yes | Yes | No |
Inpaint | Yes | Yes | No |
SoftEdge | Yes | Yes | No |
Shuffle | Yes | Yes | No |
QRCode | Yes | Yes | No |
Low Quality | No | No | Yes |
Gray | No | No | Yes |
ControlNet Types Overview
Type | Description | Best For |
---|---|---|
Canny | Edge detection | Line art, outlines, structural control |
Depth | Depth map control | 3D structure, perspective control |
HED | Advanced edge detection | Detailed edge preservation |
MLSD | Line segment detection | Architecture, geometric structures |
Normal | Surface normal maps | 3D lighting, surface details |
Scribble | Sketch to image | Converting drawings to realistic images |
In-Paint | Fill masked areas | Removing or replacing objects |
Soft Edge | Smooth edge detection | Natural, organic shapes |
Line Art | Clean line art | Anime, cartoon, illustration styles |
Key Parameters
- controlnet_type & controlnet_model: Must match the desired control method
- auto_hint: Set to “yes” to automatically process input images
- controlnet_conditioning_scale: Controls strength (0.1-2.0, default 0.5-1.0)
- init_image: Source image for control guidance
- mask_image: Required only for inpainting
Body
controlnet_model
as canny,depth
and init_image
in the request body.ControlNet API Examples
Body
Your API Key used for request authorization
The ID of the model to be used. It can be public or your trained model. Note: Multi ControlNet does not apply when using model with 'flux'
ControlNet model ID. Can be single model or comma-separated for multi-ControlNet (e.g., 'canny,depth,openpose')
canny
, depth
, hed
, mlsd
, normal
, openpose
, scribble
, segmentation
, inpaint
, softedge
, lineart
, shuffle
, tile
, face_detector
, qrcode
, blur
, pose
, gray
, low_quality
ControlNet model type. Should match one of the controlnet_model values
canny
, depth
, hed
, mlsd
, normal
, openpose
, scribble
, segmentation
, inpaint
, softedge
, lineart
, shuffle
, tile
, face_detector
, qrcode
, blur
, pose
, gray
, low_quality
Auto hint image generation
yes
, no
Set to 'yes' if you don't pass any prompt. The model will try to guess what's in the init_image and create best variations
yes
, no
Text prompt with description of required image modifications. Make it as detailed as possible for best results
Items you don't want in the image
Link to the initial image to be used as a reference
Link to the ControlNet image
Link to the mask image for inpainting
Width of the generated image. Maximum 1024x1024
64 <= x <= 1024
Height of the generated image. Maximum 1024x1024
64 <= x <= 1024
Number of images to be returned in response. Maximum value is 4
1 <= x <= 4
Scheduler to use for image generation
DDPMScheduler
, DDIMScheduler
, PNDMScheduler
, LMSDiscreteScheduler
, EulerDiscreteScheduler
, EulerAncestralDiscreteScheduler
, DPMSolverMultistepScheduler
, HeunDiscreteScheduler
, KDPM2DiscreteScheduler
, DPMSolverSinglestepScheduler
, KDPM2AncestralDiscreteScheduler
, UniPCMultistepScheduler
, DDIMInverseScheduler
, DEISMultistepScheduler
, IPNDMScheduler
, KarrasVeScheduler
, ScoreSdeVeScheduler
, LCMScheduler
Enable tomesd to generate images with fast results
yes
, no
Use Karras sigmas to generate images with nice results
yes
, no
Algorithm type used in DPMSolverMultistepScheduler
dpmsolver+++
, none
Use custom VAE in generating images
Specify the strength of the LoRa model. If using multiple LoRa, provide comma-separated values. Range: 0.1 to 1
Multi LoRa supported, pass comma-separated values. Example: 'contrast-fix,yae-miko-genshin'
Number of denoising steps
21
, 31
A checker for NSFW images. If detected, replaces with blank image
yes
, no
IP adapter ID for additional image conditioning
ip-adapter_sdxl
, ip-adapter_sd15
, ip-adapter-plus-face_sd15
Scale for IP adapter, should be between 0 and 1
0 <= x <= 1
Valid image URL for IP adapter
Enhance prompts for better results
yes
, no
Scale for ControlNet guidance. Accepts floating values from 0.1 to 5
0.1 <= x <= 5
Prompt strength when using init_image. 1.0 corresponds to full destruction of information in the init image
0 <= x <= 1
Guidance scale for generation
1 <= x <= 20
Seed for reproducible results. Pass null for random number
URL to receive POST notification when image generation is complete
ID returned in webhook response for request identification
Upscale image resolution 2x (e.g., 512x512 becomes 1024x1024)
yes
, no
Clip skip value
1 <= x <= 8
Get response as base64 string, pass init_image, mask_image, control_image as base64
yes
, no
Create temporary image link valid for 24 hours
yes
, no
Response
ControlNet generation response
Status of the image generation
success
, processing
, error
Unique identifier for the image generation
Array of generated image URLs
Array of future image URLs for queued requests
Metadata about the image generation including all parameters used
Estimated time for completion in seconds (for processing status)
Status message or additional information
Status message (alternative spelling used in API)
Additional tips or information
Additional tips or information
URL to fetch the result when processing