- 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 Image to Image
POST
/AIGCImgOpenServ/saas/sd/v2/image2image
img
Request
Header Params
X-Request-req-accessKeyId
string
required
Example:
accessKeyId
X-Request-req-accessKeySecret
string
required
Example:
accessKeySecret
Body Params application/json
n_iter
integer
generated batch
batch_size
integer
Generate quantity per batch
steps
integer
Number of iteration steps
hr_scale
integer
HD repair times
negative_prompt
string
optional
denoising_strength
number
Noise reduction strength
width
integer
optional
height
integer
optional
hr_upscaler
string
optional
alwayson_scripts
object
External incoming parameters
override_settings
object
External incoming parameters
sd_model_checkpoint
string
required
sd_vae
string
optional
output_image_format
string
Output picture format
id_task
string
required
ADetailer
object
optional
image_link
string
URL link to the image uploaded by the user
mask_link
string
User uploads the smeared url link
prompt
string
required
enable_hr
boolean
HD restoration
seed
string
optional
restore_faces
boolean
facial repair
cfg_scale
integer
optional
sampler_index
string
Sampling method
hr_second_pass_steps
integer
Next steps for HD restoration
hr_resize_x
integer
optional
hr_resize_y
integer
optional
resize_mode
integer
optional
mask_blur
integer
optional
mask_blur_x
integer
optional
mask_blur_y
integer
Vertical mask blur coefficient
inpainting_fill
integer
Mask covered content
inpaint_full_res
boolean
redraw area
inpaint_full_res_padding
integer
Edge reserved pixels
inpainting_mask_invert
integer
Mask mode
initial_noise_multiplier
number
noise multiplier
image_cfg_scale
number
optional
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": 27,
"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",
"image_link": "https://paintcdn.glutinoust.com/uploads/20230610/62491f852782a40aebd13f8838f79c69.png",
"id_task": "pro1686666",
"sd_vae": "vae-ft-mse-840000-ema-pruned.ckpt",
"override_settings": {
"CLIP_stop_at_last_layers": 2
}
}
}
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/image2image' \
--header 'X-Request-req-accessKeyId: accessKeyId' \
--header 'X-Request-req-accessKeySecret: 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": 27,
"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",
"image_link": "https://paintcdn.glutinoust.com/uploads/20230610/62491f852782a40aebd13f8838f79c69.png",
"id_task": "pro1686666",
"sd_vae": "vae-ft-mse-840000-ema-pruned.ckpt",
"override_settings": {
"CLIP_stop_at_last_layers": 2
}
}
}'
Responses
🟢200OK
application/json
Body
code
string
required
msg
string
required
data
object
required
task_id
string
id_task
Example
{
"code": "200",
"msg": "success",
"data": {
"task_id": "pro1686666"
}
}
Modified at 2024-08-09 01:54:16