Img Open English
  1. AI image generation
Img Open English
  • AI image generation
    • sd text2image
      POST
    • sd Image to Image
      POST
    • sd controlnet
      POST
    • QueryModelList
      POST
    • QueryLoralList
      POST
    • QueryVaeList
      POST
    • queryEmbeddingList
      POST
  • task query
    • queryTaskInfoV1.0
      POST
    • queryTaskInfoV2.0
      POST
    • queryImageToolTaskInfo
      POST
  • train model
    • Submit training task
      POST
    • Training result query
      POST
  • image tool
    • Flux text2image
      POST
    • Single Face Swap V1.0
      POST
    • Single Face Swap V2.0
      POST
    • instantID
      POST
    • Face restoration
      POST
    • Super Resolution
      POST
    • image description
      POST
    • Multiple Face Swap
      POST
    • Face Detection
      POST
    • Prompt expansion
      POST
    • Hairstyle changer
      POST
    • Object Removal
      POST
    • Style recognition
      POST
    • Outpainting
      POST
    • CNT preview
      POST
    • background remove
      POST
    • image enlarge
      POST
    • image watermark
      POST
  1. AI image generation

sd controlnet

POST
/AIGCImgOpenServ/saas/sd/v2/controlnet
You can now control Stable Diffusion with ControlNet. The ControlNet models are available in this API.
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

Body Params application/json

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 Code 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

Example
{
    "code": "200",
    "msg": "success",
    "data": {
        "task_id": "pro1686666"
    }
}
Modified at 2024-08-08 10:52:55
Previous
sd Image to Image
Next
QueryModelList
Built with