Flux Schnell 图像生成
line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/api/v1/ai/draw/flux/schnell
参数名 | 类型 | 默认值 | 描述 |
---|---|---|---|
model | string | "flux-schnell" | 使用的模型名称,目前仅支持"flux-schnell" |
prompt | string | - | 用于生成图像的文本提示,必填项 |
num_outputs | integer | 1 | 要生成的图像数量,最小值为1,最大值为4 |
aspect_ratio | string | "1:1" | 生成图像的宽高比,可选值有"1:1","16:9","21:9","2:3","3:2","4:5","5:4","9:16","9:21" |
seed | integer | - | 随机种子,设置此值可以使生成结果可复现 |
output_format | string | "webp" | 输出图像的格式,可选值有"webp","jpg","png" |
output_quality | integer | 80 | 输出图像的质量,取值范围为0到100,100表示最佳质量,0表示最低质量,仅对jpg和webp格式有效 |
disable_safety_checker | boolean | true | 是否禁用安全检查器,默认为true以尽量减少过滤器对用户使用的影响 |
response_format | string | "url" | 返回的图像是url还是base64编码的图片数据,可选值为"url"和"b64_json",如果是"b64_json"则额外返回base64编码的图片数据 |
请求参数
Body 参数application/x-www-form-urlencoded
model
string
模型名称-必填
示例值:
flux-schnell
prompt
string
必需
示例值:
black forest gateau cake spelling out the words \"OhMyGPT\", tasty, food photography, dynamic shot
response_format
string
可选
["url", "b64_json"]
默认url,如果此项指定为b64_json则会额外返回图像的Base64数据,这样就无需额外获取链接中的图像了示例值:
b64_json
seed
integer
可选
示例值:
{% mock 'integer' %}
num_outputs
integer
可选
1
最大4
示例值:
1
aspect_ratio
string
可选
1:1
可选["1:1","16:9","21:9","2:3","3:2","4:5","5:4","9:16","9:21"]
示例值:
1:1
output_format
string
可选
webp
可选["webp","jpg","png"]
示例值:
webp
output_quality
integer
可选
80
可选范围[0,100]
示例值:
80
disable_safety_checker
string
可选
true
设置为false可启用图像审核 防止阻止输出NSFW图片示例值:
true