Skip to main content
POST
cURL

Authorizations

TT-API-KEY
string
header
required

请前往 TTAPI 控制台 获取 API 密钥。

Body

application/json

注意:Flux生成图像接口同步返回的并不是任务的最终结果,任务的最终返回结果需要使用hookUrl参数接收异步通知,或者通过Flux查询任务结果 [blocked]接口进行查询。

prompt
string
required

生成图像描述词。注意:Flux支持多语言理解能力,但实测英文最佳。

mode
enum<string>
required

模型版本

Available options:
flux1-dev,
flux1-pro,
flux-kontext-pro,
flux-kontext-max,
flux-2-pro,
flux-2-flex,
flux-2-max,
flux-2-klein-4b,
flux-2-klein-9b
Example:

"flux1-dev"

size
enum<string>

图像尺寸

Available options:
1024x1024,
1024x1792,
1792x1024
Example:

"1024x1024"

aspect_ratio
enum<string>

图像比例

Available options:
21:9,
16:9,
4:3,
3:2,
1:1,
2:3,
3:4,
9:16,
9:21
Example:

"1:1"

hookUrl
string

回调通知地址

Response

请求成功

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

data
object
required
Example:
Last modified on March 21, 2026