To use ControlNet it's necessary to use guide images, in specific formats. The easiest way to do this is via the API.
Request format for text to image
Requests must be sent in the following format:
"newPreProcessControlNet": {
"taskUUID": "string",
"preProcessorType": "string",
"guideImageUUID": "string",
"taskType": 11,
"width": int,
"height": int,
"lowThresholdCanny": int,
"highThresholdCanny": int
}
Request components
Parameter | Type | Use |
| UUIDV4 string | Used to identify the async responses to this task. It must be sent to match the response to the task. |
| string | The preprocessor type. Here are all the available options |
| UUIDV4 string | The image guide UUID. The recommended option is to use the Image Upload Functionality |
| string | Optional. You can provide an image URL, from where the API will download the image. This adds additional delay and is not recommended. |
| int | Value: 11 |
| int | Optional. Will resize the image to this width. |
| int | Optional. Will resize the image to this height. |
| int | Optional. Available just for |
| int | Optional. Available just for |
| bool | Optional. Available just for |
| UUIDV4 string | Mandatory for ControlNet inpainting. The UUID of the image mask used for the inpainting process. |
| string | Optional. A URL can be provided, from where the API will download the guide image for the mask. This adds additional delay and is not recommended. |
Preprocessor types
Preprocessor types
canny,
depth,
mlsd,
normalbae,
openpose,
tile,
seg,
lineart,
lineart_anime,
shuffle,
scribble,
softedge
Request response
The response to the image upload request will have the following format:
{
"newImages":{
"images":[
{
"imageSrc":"string",
"imageUUID":"string",
"bNSFWContent":bool,
"taskUUID":"string"
}
]
}
}
Results will be received as an array of objects:
Parameter | Type | Use |
| string | The URL of the image to be downloaded. |
| UUIDv4 string | The unique identifier of the image. |
| boolean | Used to inform if the image has been flagged as potentially sensitive content. True indicates the image has been flagged (is a sensitive image). False indicates the image has not been flagged. The filter occasionally returns false positives and very rarely false negatives. |
| UUIDv4 string | Used to match the async responses to their corresponding tasks. |