Flux Pro 1.1 图像生成
line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/api/v1/ai/draw/flux/pro-11
参数名 | 类型 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|
model | string | "flux-11-pro" | 固定为"flux-1.1-pro" | 使用的模型名称,此接口仅支持"flux-11-pro" |
prompt | string | - | - | 用于生成图像的文本提示,是必填项。提示内容会直接影响生成图像的内容和风格,需要尽可能详细和具体地描述您想要生成的图像 |
width | integer | - | 256~1440 | 生成图像的宽度,仅在 aspect_ratio="custom" 时使用。必须是32的倍数(如果不是会自动取最接近的32的倍数)。注意:在img2img和inpainting模式下会被忽略 |
height | integer | - | 256~1440 | 生成图像的高度,仅在 aspect_ratio="custom" 时使用。必须是32的倍数(如果不是会自动取最接近的32的倍数)。注意:在img2img和inpainting模式下会被忽略 |
aspect_ratio | string | "1:1" | "custom", "1:1", "16:9", "2:3", "3:2", "4:5", "5:4", "9:16", "3:4", "4:3" | 生成图像的宽高比。当选择"custom"时,可以通过width和height参数自定义具体尺寸 |
safety_tolerance | integer | 5 | 1~5 | 内容安全容差,1表示最严格,5表示最宽松 |
seed | integer | - | - | 随机种子。设置后可以获得可 复现的生成结果 |
output_format | string | "webp" | "webp", "jpg", "png" | 输出图像的格式。建议使用默认的webp格式 |
output_quality | integer | 80 | 0~100 | 输出图像的质量,仅对jpg和webp格式有效。100表示最佳质量,0表示最低质量。建议设置在80左右以平衡质量和文件大小 |
prompt_upsampling | boolean | false | true/false | 是否自动修改提示以获得更具创意的生成结果 |
response_format | string | "url" | "url", "b64_json" | 返回的图像数据格式。默认返回图像URL。设置为"b64_json"时直接返回base64编码的图像数据,可以节省额外的网络请求,但会增加响应数据量 |
请求参数
Body 参数application/x-www-form-urlencoded
model
string
模型名称-必填
示例值:
flux-1.1-pro
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