- AI image generation
- task query
- train model
- image tool
- Flux text2imagePOST
- Single Face Swap V1.0POST
- Single Face Swap V2.0POST
- instantIDPOST
- Face restorationPOST
- Super ResolutionPOST
- image descriptionPOST
- Multiple Face SwapPOST
- Face DetectionPOST
- Prompt expansionPOST
- Hairstyle changerPOST
- Object RemovalPOST
- Style recognitionPOST
- OutpaintingPOST
- CNT previewPOST
- background removePOST
- image enlargePOST
- image watermarkPOST
sd controlnet
POST
/AIGCImgOpenServ/saas/sd/v2/controlnet
img
1.canny
2.depth
3.inpaint
4.lineart
5.MLSD
6.NormalMap
7.OpenPose
8.Reference
9.Scribble
10.Segmentation
11.Shuffle
12.SoftEdge
13.T2I-Adapter
14.Tile
15.Recolor
16.IP-Adapter
17.Instant-ID
Request
Header Params
X-Request-req-accessKeyId
string
required
X-Request-req-accessKeySecret
string
required
Body Params application/json
prompt
string
required
n_iter
integer
generated batch
batch_size
integer
Generate quantity per batch
steps
integer
Number of iteration steps
seed
integer
optional
restore_faces
boolean
facial repair
enable_hr
boolean
HD restoration
hr_scale
integer
HD repair times
width
integer
optional
height
integer
optional
negative_prompt
string
optional
cfg_scale
number
optional
sampler_index
string
Sampling method
hr_second_pass_steps
integer
Next steps for HD restoration
hr_resize_x
integer
HD restored height
hr_resize_y
integer
HD restored width
denoising_strength
number
optional
resize_mode
number
required
alwayson_scripts
object
External incoming parameters
sd_model_checkpoint
string
model code
override_settings
object
optional
id_task
string
required
sd_vae
string
optional
output_image_format
string
Output picture format
image_link
string
The base map of the graph
controlnet
object
required
Example
{
"prompt": "{best quality}, {{masterpiece}}, {highres}, original, extremely detailed,incredibly_absurdres,intricate detail,(detailed face),(face:1.2),1girl , kneeling down, from below , crying, sitting, ghost",
"n_iter": 1,
"steps": 25,
"seed": "1221212",
"restore_faces": false,
"enable_hr": false,
"hr_scale": 2,
"width": 768,
"height": 768,
"negative_prompt": "(nsfw:1.5),(nude:1.3), (child Pornography:1.2),molestation,incest,rape,about to be raped,(sex:1.3),uncensored,EasyNegative,(worst quality, low quality:1.4), (((distorted hands))),((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((b&w)), (((duplicate))), ((morbid)), ((mutilated)),poorly drawn face, out of frame, mutation, mutated, (text), signature, monster,watermark,extra fingers,fewer fingers, Wrong hands,wrong fingers,fingers crossed,styled fingers,fingers missed,missed fingers,cheese fingers, chocolate fingers,fingers on fingers,closed fist, fighting fist,fist ,hands with fist,many fists,only hands with wrong fists,fingers crossed,\r\n,",
"cfg_scale": 11,
"sampler_index": "DPM++ 2M Karras",
"hr_second_pass_steps": 20,
"hr_resize_x": 1024,
"hr_resize_y": 1024,
"denoising_strength": 0.55,
"alwayson_scripts": {
"sd_model_checkpoint": "revAnimated_v122_7371.safetensors",
"id_task": "pro1686666",
"sd_vae": "vae-ft-mse-840000-ema-pruned.vae.pt",
"image_link": "https://paintimage.glutinoust.com/api/2023_08_18/20230818183453157097_2436301704c05f465c363e5758d46cff.png",
"controlnet": {
"args": [
{
"image_link": "https://dbt-aigc.oss-cn-hangzhou.aliyuncs.com/Output-Img2/bbbb/QR_Code4.png",
"enabled": true,
"module": "inpaint_global_harmonious",
"model": "control_v1p_sd15_brightness",
"weight": 0.7,
"resize_mode": "Crop and Resize",
"low_vram": false,
"processor_res": 512,
"threshold_a": 64,
"threshold_b": 64,
"guidance_start": 0.35,
"guidance_end": 0.75,
"pixel_perfect": true,
"control_mode": "Balanced"
}
]
}
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zhiqite.com/AIGCImgOpenServ/saas/sd/v2/controlnet' \
--header 'X-Request-req-accessKeyId;' \
--header 'X-Request-req-accessKeySecret;' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "{best quality}, {{masterpiece}}, {highres}, original, extremely detailed,incredibly_absurdres,intricate detail,(detailed face),(face:1.2),1girl , kneeling down, from below , crying, sitting, ghost",
"n_iter": 1,
"steps": 25,
"seed": "1221212",
"restore_faces": false,
"enable_hr": false,
"hr_scale": 2,
"width": 768,
"height": 768,
"negative_prompt": "(nsfw:1.5),(nude:1.3), (child Pornography:1.2),molestation,incest,rape,about to be raped,(sex:1.3),uncensored,EasyNegative,(worst quality, low quality:1.4), (((distorted hands))),((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((b&w)), (((duplicate))), ((morbid)), ((mutilated)),poorly drawn face, out of frame, mutation, mutated, (text), signature, monster,watermark,extra fingers,fewer fingers, Wrong hands,wrong fingers,fingers crossed,styled fingers,fingers missed,missed fingers,cheese fingers, chocolate fingers,fingers on fingers,closed fist, fighting fist,fist ,hands with fist,many fists,only hands with wrong fists,fingers crossed,\r\n,",
"cfg_scale": 11,
"sampler_index": "DPM++ 2M Karras",
"hr_second_pass_steps": 20,
"hr_resize_x": 1024,
"hr_resize_y": 1024,
"denoising_strength": 0.55,
"alwayson_scripts": {
"sd_model_checkpoint": "revAnimated_v122_7371.safetensors",
"id_task": "pro1686666",
"sd_vae": "vae-ft-mse-840000-ema-pruned.vae.pt",
"image_link": "https://paintimage.glutinoust.com/api/2023_08_18/20230818183453157097_2436301704c05f465c363e5758d46cff.png",
"controlnet": {
"args": [
{
"image_link": "https://dbt-aigc.oss-cn-hangzhou.aliyuncs.com/Output-Img2/bbbb/QR_Code4.png",
"enabled": true,
"module": "inpaint_global_harmonious",
"model": "control_v1p_sd15_brightness",
"weight": 0.7,
"resize_mode": "Crop and Resize",
"low_vram": false,
"processor_res": 512,
"threshold_a": 64,
"threshold_b": 64,
"guidance_start": 0.35,
"guidance_end": 0.75,
"pixel_perfect": true,
"control_mode": "Balanced"
}
]
}
}
}'
Responses
🟢200OK
application/json
Body
code
string
Return status code
msg
string
Return status information
data
object
required
task_id
string
Submitted task id
Example
{
"code": "200",
"msg": "success",
"data": {
"task_id": "pro1686666"
}
}
Modified at 2024-08-08 10:52:55