cURL
curl --request POST \ --url https://www.anyfast.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "flux-1-1-pro", "prompt": "一只可爱的北极熊宝宝", "n": 1, "size": "1024x1024", "output_format": "jpeg", "seed": 123 } '
{ "created": 123, "data": [ { "b64_json": "<string>" } ] }
使用 FLUX.1.1 [pro] 根据文本描述生成图片。接口为同步调用,直接返回 Base64 编码的图片数据。
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
模型 ID
flux-1-1-pro
"flux-1-1-pro"
图片描述文字。
"一只可爱的北极熊宝宝"
生成图片数量。
1 <= x <= 4
输出图片尺寸,如 1024x1024。推荐 1024x1024。
1024x1024
"1024x1024"
输出图片格式。
jpeg
png
"jpeg"
随机种子,用于复现生成结果。
图片生成成功
创建时间戳
Show child attributes