- CV任务状态码信息附录
- 绘图信息
- 绘图任务
- 模型训练
- 绘图工具
- 图片检测
- 视频工具
- 音频工具
- 翻译
sd 图生图-v3
开发中
POST
/AIGCImgOpenServ/saas/sd/v3/image2Image
请求参数
Header 参数
X-Request-req-accessKeyId
string
接口认证ID
示例值:
openapi-ab0ve5ma5y0w0000
X-Request-req-accessKeySecret
string
接口认证密钥
示例值:
om6qr46e9pxq2z5goxp2xyj92ma10086
Body 参数application/json
prompt
string
正向提示词
<= 2000 字符
negativePrompt
string
负向提示词
iterationCount
integer
迭代次数
默认值:
1
singleBatchImageCount
integer
单次迭代图片生成数量
默认值:
1
steps
integer
采样步数
默认值:
20
seed
string
随机种子
默认值:
-1
subSeed
string
附加随机种子
subSeedStrength
number
附加随机种子交换强度
>= 0<= 1
默认值:
0
initialNoiseHeight
integer
初始噪声高度
>= 128<= 2048
默认值:
-1
initialNoiseWeight
integer
初始噪声宽度
>= 128<= 2048
restoreFaces
boolean
是否支持脸部修复
默认值:
false
enableHighDefinitionRepair
boolean
高清修复
默认值:
false
tilling
boolean
是否支持图片平铺
默认值:
false
width
integer
目标图尺寸宽度
>= 128<= 1024
默认值:
512
height
integer
目标图尺寸高度
>= 128<= 1024
默认值:
512
promptGuidanceFactor
number
提示词引导因子
>= 1<= 30
默认值:
7
samplerName
string
采样器名称
默认值:
None
samplerIndex
string
采样算法
默认值:
Euler a
deNoisingStrength
number
重绘幅度
>= 0<= 1
styles
array[string]
可选
scriptName
string
脚本名
scriptArgs
object
脚本参数
callbackUrl
string
回调地址
resizeMode
integer
图片缩放模式
imageResizeScale
number
图像缩放比例
>= 0<= 3
saasDrawingExternalImageParameterBO
object
各类脚本及设置参数
sourceImageUrl
string
原始图片
baseModelCode
string
SD基础模型编码
vaeName
string
VAE模型名称
businessTaskId
string
业务方自定义任务ID
targetImageFormat
string
输出图片格式
saasDrawingOverrideSettingParameterBO
object
覆盖设置参数
saasDrawingADetailerPluginBO
object
ADetailer插件
saasDrawingControlPluginBO
object
controlNet插件
示例
{
"prompt": "string",
"negativePrompt": "string",
"iterationCount": 1,
"singleBatchImageCount": 1,
"steps": 20,
"seed": "-1",
"subSeed": "string",
"subSeedStrength": 0,
"initialNoiseHeight": -1,
"initialNoiseWeight": 128,
"restoreFaces": false,
"enableHighDefinitionRepair": false,
"tilling": false,
"width": 512,
"height": 512,
"promptGuidanceFactor": 7,
"samplerName": "None",
"samplerIndex": "Euler a",
"deNoisingStrength": 0,
"styles": [
"string"
],
"scriptName": "string",
"scriptArgs": {},
"callbackUrl": "string",
"resizeMode": 0,
"imageResizeScale": 0,
"saasDrawingExternalImageParameterBO": {
"sourceImageUrl": "string",
"baseModelCode": "string",
"vaeName": "string",
"businessTaskId": "string",
"targetImageFormat": "string",
"saasDrawingOverrideSettingParameterBO": {
"clipSkipLayers": 1
},
"saasDrawingADetailerPluginBO": {
"saasDrawingADetailerPluginParameterBOS": [
{
"enablePlugin": false,
"modelName": "string",
"prompt": "string",
"negativePrompt": "string",
"confidenceThreshold": 0.3,
"maskAreaMinRatio": 0,
"maskAreaMaxRatio": 0,
"imageExpansionPixel": 4,
"maskOffsetOfXAxis": 0,
"maskOffsetOfYAxis": 0,
"maskMergeMode": "None",
"maskFuzzyBoundaryPixel": 4,
"reductionNoiseStrength": 0.4,
"repairSourceImageMask": false,
"repairSourceImageMaskAreaPixel": 32,
"useRepairedImageScaleSwitch": false,
"repairedImageWidth": 512,
"repairedImageHeight": 512,
"usePluginGenerateStep": true,
"generateStep": 28,
"usePluginPromptGuidanceFactor": true,
"promptGuidanceFactor": 7,
"usePluginSampler": true,
"sampler": "string",
"usePluginNoiseMultiplier": true,
"noiseMultiplier": 1,
"userPluginClipSkipLayers": true,
"clipSkipLayers": 1,
"enablePluginRestoreFace": true,
"controlNetModel": "string",
"controlNetModule": "string",
"controlNetWeight": 1,
"startGuidanceStep": 0,
"endGuidanceStep": 1
}
]
},
"saasDrawingControlPluginBO": {
"saasDrawingControlPluginParameterBOS": [
{
"controlImageUrl": "string",
"enabled": false,
"module": "string",
"model": "string",
"weight": 0.7,
"imageResize": "string",
"reduceVideoMemoryUsage": true,
"processorReSize": 512,
"thresholdA": 0,
"thresholdB": 0,
"guidanceStart": 0,
"guidanceEnd": 1,
"pixelPerfect": true,
"controlMode": "string",
"inputMode": "string",
"batchImages": "string",
"loopback": true
}
]
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zhiqite.com/AIGCImgOpenServ/saas/sd/v3/image2Image' \
--header 'X-Request-req-accessKeyId: openapi-ab0ve5ma5y0w0000' \
--header 'X-Request-req-accessKeySecret: om6qr46e9pxq2z5goxp2xyj92ma10086' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "string",
"negativePrompt": "string",
"iterationCount": 1,
"singleBatchImageCount": 1,
"steps": 20,
"seed": "-1",
"subSeed": "string",
"subSeedStrength": 0,
"initialNoiseHeight": -1,
"initialNoiseWeight": 128,
"restoreFaces": false,
"enableHighDefinitionRepair": false,
"tilling": false,
"width": 512,
"height": 512,
"promptGuidanceFactor": 7,
"samplerName": "None",
"samplerIndex": "Euler a",
"deNoisingStrength": 0,
"styles": [
"string"
],
"scriptName": "string",
"scriptArgs": {},
"callbackUrl": "string",
"resizeMode": 0,
"imageResizeScale": 0,
"saasDrawingExternalImageParameterBO": {
"sourceImageUrl": "string",
"baseModelCode": "string",
"vaeName": "string",
"businessTaskId": "string",
"targetImageFormat": "string",
"saasDrawingOverrideSettingParameterBO": {
"clipSkipLayers": 1
},
"saasDrawingADetailerPluginBO": {
"saasDrawingADetailerPluginParameterBOS": [
{
"enablePlugin": false,
"modelName": "string",
"prompt": "string",
"negativePrompt": "string",
"confidenceThreshold": 0.3,
"maskAreaMinRatio": 0,
"maskAreaMaxRatio": 0,
"imageExpansionPixel": 4,
"maskOffsetOfXAxis": 0,
"maskOffsetOfYAxis": 0,
"maskMergeMode": "None",
"maskFuzzyBoundaryPixel": 4,
"reductionNoiseStrength": 0.4,
"repairSourceImageMask": false,
"repairSourceImageMaskAreaPixel": 32,
"useRepairedImageScaleSwitch": false,
"repairedImageWidth": 512,
"repairedImageHeight": 512,
"usePluginGenerateStep": true,
"generateStep": 28,
"usePluginPromptGuidanceFactor": true,
"promptGuidanceFactor": 7,
"usePluginSampler": true,
"sampler": "string",
"usePluginNoiseMultiplier": true,
"noiseMultiplier": 1,
"userPluginClipSkipLayers": true,
"clipSkipLayers": 1,
"enablePluginRestoreFace": true,
"controlNetModel": "string",
"controlNetModule": "string",
"controlNetWeight": 1,
"startGuidanceStep": 0,
"endGuidanceStep": 1
}
]
},
"saasDrawingControlPluginBO": {
"saasDrawingControlPluginParameterBOS": [
{
"controlImageUrl": "string",
"enabled": false,
"module": "string",
"model": "string",
"weight": 0.7,
"imageResize": "string",
"reduceVideoMemoryUsage": true,
"processorReSize": 512,
"thresholdA": 0,
"thresholdB": 0,
"guidanceStart": 0,
"guidanceEnd": 1,
"pixelPerfect": true,
"controlMode": "string",
"inputMode": "string",
"batchImages": "string",
"loopback": true
}
]
}
}
}'
返回响应
🟢200成功
application/json
Body
code
string
响应码
msg
string
响应信息
data
object
可选
saasTaskId
string
任务ID
示例
{
"code": "200",
"msg": "success",
"data": {
"saasTaskId": "pro1729237726210236813759"
}
}
修改于 2024-10-18 08:21:24