Image, Audio and Video
API V2 to V3 Migration Guide
Text to Image
Request Body Parameter Mapping
V2 | V3 | Description |
---|---|---|
extraobject | extraobject | |
enable_nsfw_detection boolean | enable_nsfw_detection boolean | |
nsfw_detection_level Enum: 0, 1, 2 | nsfw_detection_level Enum: 0, 1, 2 | |
enable_progress_info | Deprecated | |
response_image_type Enum: png , jpeg | response_image_type Enum: png, webp, jpeg | V3 adds support for webp image format |
requestobject | New Field All image generation parameters must be passed via the request in V3 | |
promptstring <lora:$sd_name:$weight> | promptstring | Moved Inside |
lorasobject[] | Moved Inside Migrate LoRA usage: From prompt to request.loras parameter | |
model_namestring | New Field Name of lora, retrieve the corresponding sd_name_in_api value by invoking the Get Model API endpoint with filter.types=lora as the query parameter. | |
strengthnumber(float32) | New Field The strength value of lora. The larger the value, the more biased the effect is towards lora, Range [0, 1] | |
negative_promptstring | negative_promptstring | Moved Inside |
sampler_namestring | sampler_namestring | Moved Inside |
batch_sizeinteger | image_numinteger | Changednum_images → request.image_num |
n_iter | Deprecated | |
stepsstring | stepsstring | Moved Inside |
cfg_scaleinteger | guidance_scale number(float32) | Changedcfg_scale → request.guidance_scale |
seedinteger | seedinteger | Moved Inside |
heightinteger | heightinteger | Moved Inside Range Change: [128, 2048]. |
widthinteger | widthinteger | Moved Inside Range Change: [128, 2048]. |
model_namestring | model_namestring | Moved Inside This parameter specifies the name of the model checkpoint. Retrieve the corresponding sd_name value by invoking the Query Model API with filter.types=checkpoint as the query parameter. |
restore_facesbool | restore_facesbool | Moved Inside |
restore_faces_model | Deprecated | |
sd_vaestring | sd_vaestring | Moved Inside |
clip_skipinteger | clip_skipinteger | Moved Inside |
enable_hrboolean | hires_fixobject | Changedenable_hr → request.hires_fix |
hr_upscaler Enum: Latent , ESRGAN_4x , R-ESRGAN 4x+ , R-ESRGAN 4x+ Anime6B | upscaler Enum: RealESRGAN_x4plus_anime_6B , RealESRNet_x4plus,Latent | Changedhr_upscaler →request.hires_fix.upscaler |
hr_scalenumber | Deprecated | |
hr_resize_xinteger | target_widthinteger | Changedhr_resize_x → request.hires_fix.target_width |
hr_resize_yinteger | target_heightinteger | Changedhr_resize_y → request.hires_fix.target_height |
img_expire_ttlinteger | Deprecated Default 3600s | |
sd_refinerobject | refinerobject | Changedsd_refiner → request.refiner |
checkpointstring | Deprecated | |
switch_at number(float32) | switch_at number(float32) | Changedsd_refiner.switch_at → request.refiner.switch_at |
controlnet_unitsobject[] | Deprecatedimg2img Only |
Response Parameter Mapping
V2 | V3 | Description |
---|---|---|
code | Deprecated | |
msg | Deprecated | |
data | Deprecated | |
task_id | task_id | Changeddata.task_id → task_id |
warn | Deprecated |
Example
Text to Image V2
- Request
- Response
Text to Image V3
- Reqeust
- Repspone
Image to Image
Request Body Parameter Mapping
V2 | V3 | Description |
---|---|---|
extraobject | extraobject | |
enable_nsfw_detection boolean | enable_nsfw_detection boolean | |
nsfw_detection_level Enum: 0, 1, 2 | nsfw_detection_level Enum: 0, 1, 2 | |
enable_progress_info | Deprecated | |
response_image_type Enum: png , jpeg | response_image_type Enum: png, webp, jpeg | V3 adds support for webp image format |
requestobject | New field All image generation parameters must be passed via the request in V3 | |
promptstring <lora:$sd_name:$weight> | promptstring | Moved Inside |
lorasobject[] | Moved Inside Migrate LoRA usage: From prompt to request.loras parameter | |
model_namestring | New Field Name of lora, retrieve the corresponding sd_name_in_api value by invoking the Get Model API endpoint with filter.types=lora as the query parameter. | |
strength number(float32) | New Field The strength value of lora. The larger the value, the more biased the effect is towards lora, Range [0, 1] | |
negative_promptstring | negative_prompt string | Moved Inside |
sampler_namestring | sampler_namestring | Moved Inside |
batch_sizeinteger | image_numinteger | Changedbatch_size → request.image_num |
n_iterinteger | Deprecated | |
stepsstring | stepsstring | Moved Inside |
cfg_scaleinteger | guidance_scale number(float32) | Changedcfg_scale → request.guidance_scale |
seedinteger | seedinteger | Moved Inside |
heightinteger | heightinteger | Moved Inside Range Change: [128, 2048]. |
widthinteger | widthinteger | Moved Inside Range Change: [128, 2048]. |
model_namestring | model_namestring | Moved Inside This parameter specifies the name of the model checkpoint. Retrieve the corresponding sd_name value by invoking the Query Model API with filter.types=checkpoint as the query parameter. |
init_imagesstring[] | image_base64string | Changedinit_images → request.image_base64 |
denoising_strength number(float) | strength number(float) | Changeddenoising_strength → request.strength |
restore_facesbool | Deprecated | |
sd_vaestring | sd_vaestring | Moved Inside |
clip_skipinteger | clip_skipinteger | Moved Inside |
maskstring | Deprecated Recommendation: Use V3 Inpainting API | |
mask_blurinteger | Deprecated Recommendation: Use V3 Inpainting API | |
resize_modeinteger | Deprecated | |
image_cfg_scaleinteger | Deprecated | |
inpainting_fillinteger | Deprecated Recommendation: Use V3 Inpainting API | |
inpaint_full_resinteger | Deprecated Recommendation: Use V3 Inpainting API | |
inpaint_full_res_padding integer | Deprecated Recommendation: Use V3 Inpainting API | |
inpainting_mask_invert integer | Deprecated Recommendation: Use V3 Inpainting API | |
initial_noise_multiplier number(float32) | Deprecated | |
img_expire_ttlinteger | Deprecated Default 3600s | |
sd_refinerobject | refinerobject | Changedsd_refiner → request.refiner |
checkpoint | Deprecated | |
switch_at number(float32) | switch_at number(float32) | Moved Inside |
controlnetobject | New Field | |
controlnet_unitsobject[] | unitsobject[] | Changedcontrolnet_units → request.controlnet.units |
modelstring | model_name string | Changedcontrolnet_units.model → request.controlnet.units.model_name |
weightnumber | strength number(float32) | Changedcontrolnet_units.weight → request.controlnet.units.strength |
input_imagestring | image_base64 string | Changedcontrolnet_units.input_image → request.controlnet.units.image_base64 |
modulestring,Enum | preprocessor string,Enum | Changedcontrolnet_units.module → request.controlnet.units.preprocessor |
control_mode | Deprecated | |
mask | Deprecated Recommendation: Use V3 Inpainting API | |
resize_mode | Deprecated | |
processor_res | Deprecated | |
threshold_a | Deprecated | |
threshold_b | Deprecated | |
guidance_start number(float32) | guidance_start number(float32) | Moved Inside |
guidance_end number(float32) | guidance_end number(float32) | Moved Inside |
pixel_perfect | Deprecated |
Response Parameter Mapping
V2 | V3 | Description |
---|---|---|
code | Deprecated | |
msg | Deprecated | |
data | Deprecated | |
task_id | task_id | Changeddata.task_id → task_id |
warn | Deprecated |
Example
Image to Image V2
- Request
- Response
Image to Image V3
- Request
- Response