API Reference
List ControlNet Models

List ControlNet Models and Pre-processors

Action ListControlNets

Introduction

This interface is used to query the models and pre-processors of ControlNets.

Request

Parameter NameTypeDescriptionRequired
ActionStringThe corresponding API instruction name
PublicKeyStringUser's public key, which can be obtained from the PICPIK User Center (opens in a new tab)
SignatureStringUser's signature generated based on the public key and API instruction, see Signature for details
request_uuidStringRequest UUID, randomly generated by using the UUID generation method. This parameter can be utilized to manage the requests of your business and clients.

Request Example

{
    "Action":    "ListControlNets",
    "PublicKey": "ALLak9M4cNdHXKOJAJJ4k8Hh1hZS2EgJF1D0FlPwfl",
    "request_uuid":"b91fcfbe-bb35-47ce-a168-bd6252c75270",
    "Signature": "0131f4e4296f3ca8e1220b47247e83a4315ea8e1"
}

Response

Field NameTypeDescriptionRequired
RetCodeIntReturn status code: 0 indicates a successful return, while non-zero indicates a failure
ActionStringInstruction name
MessageStringThe error message is returned when RetCode is non-zero, providing a detailed description
request_uuidStringReturns the UUID that were included in the request
Field NameTypeDescriptionRequired
PreProcessorsMap[String]PreProcessorPre-processors list of ControlNets
ControlModelsMap[String]ControlModelModels list of ControlNets

Intro to Complex Data Types

PreProcessor

Parameter NameTypeDescriptionRequired
ModelCodeStringThe model code of a ControlNet pre-processor.
InferenceParamsInferenceParamsInference parameters of a pre-processor

ControlModel

Parameter NameTypeDescriptionRequired
ModelCodeStringControlNet model code
InferenceParamsInferenceParamsInference parameters of a ControlNet model

InferenceParams

Note: Specific parameters are only valid for a particular model data type (parent) and are not generic.

Parameter NameTypeValid Parent TypeDescriptionDefaultRangeStepRequired
LoraWeightFloatModelThe influence weight when inferencing. Only available with the LoRA model.1-1~20.01
ResolutionIntPreProcessorThe resolution of images generated by the pre-processor.51264~204864
ControlWeightFloatControlModelThe influence weight of a ControlNet model when inferencing.10~20.01
StartingStepFloatControlModelTiming (ratio) of a ControlNet model to start intervening in the inference process.00~10.01
EndingStepFloatControlModelTiming (ratio) of a ControlNet model to stop intervening in the inference process.10~10.01

Response Example

{
	"Action": "ListControlNets",
	"RetCode": 0,
	"Message": "",
	"request_uuid": "06e47e54-253e-40d7-9002-a3f7d9d4cbdd",
	"PreProcessors": {
		"canny": {
			"Name": "canny",
			"ModelCode": "canny",
			"InferenceParams": {
				"CannyHighThreshold": 200,
				"CannyLowThreshold": 100,
				"Resolution": 512
			}
		}
		// more...
	},
	"ControlModels": {
		"control_v11e_sd15_ip2p": {
			"Name": "control_v11e_sd15_ip2p",
			"ModelCode": "control_v11e_sd15_ip2p",
			"InferenceParams": {
				"ControlWeight": 1,
				"StartingStep": 0,
				"EndingStep": 1,
				"ControlMode": "Balanced",
				"ResizeMode": "ResizeAndFill"
			}
		}
		// more ...
	}
}