创建
开发中POST
https://duomiapi.com/v1/images/generations请求参数
Header 参数
Authorization
string
可选
示例值:
Bh3oi26r1FPFCMrJ59RKngSXB2
Body 参数application/json
model
enum<string>
模型
枚举值:
stabilityai/stable-diffusion-2-1stabilityai/stable-diffusion-xl-base-1.0stabilityai/stable-diffusion-3-mediumblack-forest-labs/FLUX.1-schnellblack-forest-labs/FLUX.1-devstabilityai/stable-diffusion-3-5-large
prompt
string
描述词
negative_prompt
string
负向描述词 不想出现的内容
image_size
enum<string>
尺寸
枚举值:
1024x1024512x1024768x512768x10241024x576576x1024
默认值:
1024x1024
batch_size
integer
图片张数
默认值:
1
seed
integer
随机种子
num_inference_steps
integer
推理步数
默认值:
20
guidance_scale
number
权重
默认值:
7.5
示例
{
"model": "black-forest-labs/FLUX.1-schnell",
"prompt": " an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea",
"negative_prompt": "",
"image_size": "1024x1024",
"batch_size": 1,
"seed": 51515151,
"num_inference_steps": 20,
"guidance_scale": 7.5
}
示例代码
返回响应
成功(200)
失败(404)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
string
可选
示例
{
"images": [
{
"url": "https://sf-maas-uat-prod.oss-cn-shanghai.aliyuncs.com/outputs/b5e4b0ae-fe0c-451a-9cf5-657234887520_0.jpeg"
}
],
"timings": {
"inference": 14.772
},
"seed": 51515151,
"shared_id": "0",
"data": [
{
"url": "https://sf-maas-uat-prod.oss-cn-shanghai.aliyuncs.com/outputs/b5e4b0ae-fe0c-451a-9cf5-657234887520_0.jpeg"
}
],
"created": 1730173193
}
最后修改时间: 2 个月前