众扬汇 AI 开放平台 API 文档

flux-2-pro

OpenAPI Specification

FLUX 2 Pro 图像生成/编辑接口(BFL 兼容路径),按量计费,不同分辨率单价不同。

请求方式:POST

接口地址

text
https://api.allyang.cn/bfl/v1/flux-2-pro

请求头

  • Content-Type(必填):请求体类型,按本页标注填写。(示例:application/json)
  • Authorization(可选):鉴权头,使用控制台创建的令牌,格式为 Bearer + 令牌。(示例:Bearer {{YOUR_API_KEY}})

请求参数(application/json)

  • prompt_upsampling(boolean,可选)
  • prompt(string,必填)
  • seed(integer,可选)
  • width(integer,可选)
  • height(integer,可选)
  • safety_tolerance(integer,可选)
  • output_format(string,可选)

请求示例

json
{
  "prompt_upsampling": true,
  "prompt": "画只猫",
  "seed": 42,
  "width": 65,
  "height": 65,
  "safety_tolerance": 2,
  "output_format": "jpeg"
}

返回字段

  • id(string,必填)
  • polling_url(string,必填)
  • cost(integer,必填)
  • input_mp(integer,必填)
  • output_mp(integer,必填)

使用提示:单价与可用规格以本平台计费页为准(待补);提交后请轮询任务状态。