Skip to main content

Text to Image

Request Body Parameter Mapping

V2V3Description
extraobjectextraobject
enable_nsfw_detection
boolean
enable_nsfw_detection
boolean
nsfw_detection_level
Enum: 0, 1, 2
nsfw_detection_level
Enum: 0, 1, 2
enable_progress_infoDeprecated
response_image_type
Enum: png, jpeg
response_image_type
Enum: png, webp, jpeg
V3 adds support for webpimage format
requestobjectNew Field
All image generation parameters must be passed via the requestin V3
promptstring
<lora:$sd_name:$weight>
promptstringMoved Inside
lorasobject[]Moved Inside
Migrate LoRA usage: From prompt to request.loras parameter
model_namestringNew 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_promptstringnegative_promptstringMoved Inside
sampler_namestringsampler_namestringMoved Inside
batch_sizeintegerimage_numintegerChanged
num_images request.image_num
n_iterDeprecated
stepsstringstepsstringMoved Inside
cfg_scaleintegerguidance_scale
number(float32)
Changed
cfg_scale request.guidance_scale
seedintegerseedintegerMoved Inside
heightintegerheightintegerMoved Inside
Range Change: [128, 2048].
widthintegerwidthintegerMoved Inside
Range Change: [128, 2048].
model_namestringmodel_namestringMoved 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_facesboolrestore_facesboolMoved Inside
restore_faces_modelDeprecated
sd_vaestringsd_vaestringMoved Inside
clip_skipintegerclip_skipintegerMoved Inside
enable_hrbooleanhires_fixobjectChanged
enable_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
Changed
hr_upscalerrequest.hires_fix.upscaler
hr_scalenumberDeprecated
hr_resize_xintegertarget_widthintegerChanged
hr_resize_x request.hires_fix.target_width
hr_resize_yintegertarget_heightintegerChanged
hr_resize_y request.hires_fix.target_height
img_expire_ttlintegerDeprecated
Default 3600s
sd_refinerobjectrefinerobjectChanged
sd_refiner request.refiner
checkpointstringDeprecated
switch_at
number(float32)
switch_at
number(float32)
Changed
sd_refiner.switch_at request.refiner.switch_at
controlnet_unitsobject[]Deprecated
img2img Only

Response Parameter Mapping

V2V3Description
codeDeprecated
msgDeprecated
dataDeprecated
task_idtask_idChanged
data.task_id task_id
warnDeprecated

Example

Text to Image V2

  • Request
  • Response

Text to Image V3

  • Reqeust
  • Repspone

Image to Image

Request Body Parameter Mapping

V2V3Description
extraobjectextraobject
enable_nsfw_detection
boolean
enable_nsfw_detection
boolean
nsfw_detection_level
Enum: 0, 1, 2
nsfw_detection_level
Enum: 0, 1, 2
enable_progress_infoDeprecated
response_image_type
Enum: png, jpeg
response_image_type
Enum: png, webp, jpeg
V3 adds support for webpimage format
requestobjectNew field
All image generation parameters must be passed via the requestin V3
promptstring
<lora:$sd_name:$weight>
promptstringMoved Inside
lorasobject[]Moved Inside
Migrate LoRA usage: From prompt to request.loras parameter
model_namestringNew 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_promptstringnegative_prompt
string
Moved Inside
sampler_namestringsampler_namestringMoved Inside
batch_sizeintegerimage_numintegerChanged
batch_size request.image_num
n_iterintegerDeprecated
stepsstringstepsstringMoved Inside
cfg_scaleintegerguidance_scale
number(float32)
Changed
cfg_scale request.guidance_scale
seedintegerseedintegerMoved Inside
heightintegerheightintegerMoved Inside
Range Change: [128, 2048].
widthintegerwidthintegerMoved Inside
Range Change: [128, 2048].
model_namestringmodel_namestringMoved 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_base64stringChanged
init_images request.image_base64
denoising_strength
number(float)
strength
number(float)
Changed
denoising_strength request.strength
restore_facesboolDeprecated
sd_vaestringsd_vaestringMoved Inside
clip_skipintegerclip_skipintegerMoved Inside
maskstringDeprecated
Recommendation: Use V3 Inpainting API
mask_blurintegerDeprecated
Recommendation: Use V3 Inpainting API
resize_modeintegerDeprecated
image_cfg_scaleintegerDeprecated
inpainting_fillintegerDeprecated
Recommendation: Use V3 Inpainting API
inpaint_full_resintegerDeprecated
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_ttlintegerDeprecated
Default 3600s
sd_refinerobjectrefinerobjectChanged
sd_refiner request.refiner
checkpointDeprecated
switch_at
number(float32)
switch_at
number(float32)
Moved Inside
controlnetobjectNew Field
controlnet_unitsobject[]unitsobject[]Changed
controlnet_units request.controlnet.units
modelstringmodel_name
string
Changed
controlnet_units.model
request.controlnet.units.model_name
weightnumberstrength
number(float32)
Changed
controlnet_units.weight
request.controlnet.units.strength
input_imagestringimage_base64
string
Changed
controlnet_units.input_image
request.controlnet.units.image_base64
modulestring,Enumpreprocessor
string,Enum
Changed
controlnet_units.module
request.controlnet.units.preprocessor
control_modeDeprecated
maskDeprecated
Recommendation: Use V3 Inpainting API
resize_modeDeprecated
processor_resDeprecated
threshold_aDeprecated
threshold_bDeprecated
guidance_start
number(float32)
guidance_start
number(float32)
Moved Inside
guidance_end
number(float32)
guidance_end
number(float32)
Moved Inside
pixel_perfectDeprecated

Response Parameter Mapping

V2V3Description
codeDeprecated
msgDeprecated
dataDeprecated
task_idtask_idChanged
data.task_id task_id
warnDeprecated

Example

Image to Image V2

  • Request
  • Response

Image to Image V3

  • Request
  • Response
Last modified on April 9, 2025