统一模型接入与用量管理 立即注册
蓝天
原站参考文档

以下为胜算云公开资料。文中的原站账号、地址、定价和专有服务不属于蓝天;蓝天可用模型以当前 sub2api 配置为准。接入蓝天请先查看 快速开始。

查看原文

Flux-1.1-pro

black-forest-labs/flux-1.1-pro
异步任务:POST /v1/tasks/generations 提交 → GET /v1/tasks/generations/{request_id} 轮询结果(POST 发送后 request_id 自动填入 GET)。

BASE URLhttps://router.shengsuanyun.com/api
认证方式Authorization: Bearer YOUR_API_KEY

端点列表

← 上一页
Flux-1.1-pro-ultra
下一页 →
Vidu 视频系列 · 接口汇总

接口参考

以下为原文协议定义与示例,原站地址不代表蓝天已开通对应能力。蓝天接入地址和模型以本地配置为准。

蓝天 API 密钥
POST/v1/tasks/generationsFlux 图像生成-异步

异步任务:POST 提交后返回 request_id,再用 GET /v1/tasks/generations/{request_id} 轮询结果。

请求体

application/json

object

anyOf · 1
字段类型说明
prompt必填stringtextarea描述你想生成的图像内容
aspect_ratiostring选择 custom 可自定义宽度和高度

可选值:"1:1" · "16:9" · "3:2" · "2:3" · "4:5" · "5:4" · "9:16" · "3:4" · "4:3" · "custom"

widthinteger仅当 aspect_ratio=custom 时使用。必须是32的倍数(会自动四舍五入)
heightinteger仅当 aspect_ratio=custom 时使用。必须是32的倍数(会自动四舍五入)
safety_toleranceinteger1为最严格,6为最宽松
output_formatstring

可选值:"webp" · "jpg" · "png"

output_qualityinteger图片质量,0-100,100为最佳质量。对png格式无效
prompt_upsamplingboolean自动修改提示词以获得更有创意的生成效果
seedinteger设置固定种子以获得可重复的结果
model必填string路由模型,本页固定为 black-forest-labs/flux-1.1-pro
anyOf · 2
字段类型说明
prompt必填stringtextarea描述你想生成的图像内容
image_prompt必填string用于 Flux Redux 的参考图片,与文本提示词一起引导生成符合图片构图的内容。支持 jpeg、png、gif 或 webp 格式
aspect_ratiostring选择 custom 可自定义宽度和高度

可选值:"1:1" · "16:9" · "3:2" · "2:3" · "4:5" · "5:4" · "9:16" · "3:4" · "4:3" · "custom"

widthinteger仅当 aspect_ratio=custom 时使用。必须是32的倍数(会自动四舍五入)
heightinteger仅当 aspect_ratio=custom 时使用。必须是32的倍数(会自动四舍五入)
safety_toleranceinteger1为最严格,6为最宽松
output_formatstring

可选值:"webp" · "jpg" · "png"

output_qualityinteger图片质量,0-100,100为最佳质量。对png格式无效
prompt_upsamplingboolean自动修改提示词以获得更有创意的生成效果
seedinteger设置固定种子以获得可重复的结果
model必填string路由模型,本页固定为 black-forest-labs/flux-1.1-pro
{
  "aspect_ratio": "3:2",
  "model": "black-forest-labs/flux-1.1-pro",
  "output_format": "jpg",
  "output_quality": 80,
  "prompt": "A surreal post-apocalyptic landscape with a dramatic crimson red sky and dark clouds. A massive, abandoned, and decaying futuristic spaceship crash-landed into a lush green forest, with a lone figure stands on a rocky gazing at the wreckage.",
  "prompt_upsampling": false,
  "safety_tolerance": 2
}

请求示例

参考地址:https://router.shengsuanyun.com/api。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。

curl -X POST 'https://router.shengsuanyun.com/api/v1/tasks/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  --data '{
  "aspect_ratio": "3:2",
  "model": "black-forest-labs/flux-1.1-pro",
  "output_format": "jpg",
  "output_quality": 80,
  "prompt": "A surreal post-apocalyptic landscape with a dramatic crimson red sky and dark clouds. A massive, abandoned, and decaying futuristic spaceship crash-landed into a lush green forest, with a lone figure stands on a rocky gazing at the wreckage.",
  "prompt_upsampling": false,
  "safety_tolerance": 2
}'

响应

200 提交成功,返回 request_id / task_id

application/json

未提供结构定义。

{
  "code": "success",
  "message": "",
  "data": {
    "request_id": "REQ_xxx",
    "task_id": "TASK_xxx",
    "action": "GENERATION",
    "status": "PENDING",
    "progress": "0%"
  }
}
400 请求参数错误
401 未授权(API Key 无效)
429 请求过于频繁
500 服务器内部错误
GET/v1/tasks/generations/{request_id}查询异步任务状态与产物

通过 POST /v1/tasks/generations 返回的 request_id 轮询任务状态、进度与产物 URL(image_urls / video_urls / audio_urls / file_urls / text)。下方「在线测试」填入 request_id 即可发送查询;若上方 POST 已发送成功,request_id 会自动填入。

请求参数

参数位置 / 类型说明
request_id必填path / stringPOST /v1/tasks/generations 返回的请求 ID

请求示例

参考地址:https://router.shengsuanyun.com/api。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。

curl -X GET 'https://router.shengsuanyun.com/api/v1/tasks/generations/{request_id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'

响应

200 任务状态与产物

application/json

未提供结构定义。

{
  "image_urls": [
    "https://oss.shengsuanyun.com/example/modelinfo/196/2025-10-14_13:09:31_output_1.jpg"
  ],
  "progress": 100
}
400 请求参数错误
401 未授权(API Key 无效)
429 请求过于频繁
500 服务器内部错误