EZLINK AI API
  1. 异步兼容格式
EZLINK AI API
  • Video
    • Veo3视频生成
      POST
    • 即梦视频生成
      POST
    • 可灵视频生成
      POST
    • 视频生成结果查询
      GET
  • Image
    • openai兼容格式(同步)
    • 异步兼容格式
      • Flux异步图像生成
        POST
      • 可灵绘图
        POST
      • 异步图像结果查询
        GET
  • LLMs
    • openai兼容
  • Schemas
    • Schemas
      • Veo3VideoGenerationRequest
      • VideoGenerationRequest
      • Veo3Instance
      • Veo3Image
      • Veo3Parameters
      • JimengVideoGenerationRequest
      • JimengContent
      • JimengImage
      • JimengImageUrl
      • JimengParameters
      • FluxImageGenerationRequest
  1. 异步兼容格式

Flux异步图像生成

POST
/v1/async/images/generations
使用Black Forest Labs的Flux模型进行异步图像生成。支持多种Flux模型,包括文生图、图生图、图像编辑等功能。兼容官方API格式,额外添加model参数来选择不同的Flux模型。

支持的Flux模型:#

图像生成模型:#

flux-pro-1.1:Flux Pro 1.1 最新版本,高质量图像生成
flux-pro:Flux Pro 标准版本,专业级图像生成
flux-dev:Flux Dev 开发版本,适合开发和测试
flux-schnell:Flux Schnell 快速版本,生成速度快

专业功能模型:#

flux-pro-1.1-ultra:Flux Pro 1.1 Ultra模式,超高质量图像生成,支持raw模式
flux-kontext-pro:Flux Kontext Pro,支持图像编辑和创建
flux-kontext-max:Flux Kontext Max,增强版图像编辑
flux-fill-pro:Flux Fill Pro,图像填充和修复,支持蒙版
flux-canny-pro:Flux Canny Pro,基于Canny边缘检测的图像生成
flux-depth-pro:Flux Depth Pro,基于深度图的图像生成
flux-realism:Flux Realism,专注于真实感图像生成

图像操作模型:#

flux-outpaint:Flux Outpaint,图像扩展功能
flux-expand:Flux Expand,图像边缘扩展

通用参数说明:#

大部分Flux模型支持以下通用参数:
prompt:文本提示词,描述希望生成的图像内容
width/height:图像尺寸(某些模型支持)
aspect_ratio:宽高比,如"1:1"、"16:9"、"9:16"等
seed:随机种子,用于复现结果
steps:生成步数,影响图像质量和生成时间
guidance:引导强度,控制提示词的影响程度
output_format:输出格式,支持"jpeg"、"png"、"webp"
safety_tolerance:安全容忍度,1-6级别
prompt_upsampling:是否增强提示词

特殊功能参数:#

图像输入相关:#

input_image:输入图像(Base64编码),用于图生图、图像编辑等
control_image:控制图像,用于Canny、Depth等控制模型
mask:蒙版图像,用于Fill等填充模型

回调相关:#

webhook_url:完成后的回调URL
webhook_secret:回调验证密钥

模型特定参数:#

不同模型可能有特定的参数要求和限制,具体请参考各模型的官方文档。

Request

Header Params

Body Params application/json

Examples
{
    "model": "flux-pro-1.1",
    "prompt": "A beautiful landscape with mountains and a lake at sunset",
    "aspect_ratio": "16:9",
    "output_format": "jpeg",
    "safety_tolerance": 2
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST '/v1/async/images/generations' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "flux-pro-1.1",
    "prompt": "A beautiful landscape with mountains and a lake at sunset",
    "aspect_ratio": "16:9",
    "output_format": "jpeg",
    "safety_tolerance": 2
}'

Responses

🟢200OK
application/json
Flux图像生成任务提交成功
Body

Example
{
    "id": "string",
    "polling_url": "string"
}
🟠422Parameter Error
Modified at 2025-07-16 08:35:07
Previous
视频生成结果查询
Next
可灵绘图
Built with