image_size Available options: 1024x1024, 512x1024, 768x512, 768x1024, 1024x576, 576x1024 seed Required range: 0 < x < 9999999999 prompt_enhancement: default: false(Rewrite prompts into detailed, model-friendly versions when switched on.)
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
prompt
string
必需
所需图像的文本描述。最大长度为 1000 个字符。
n
integer
可选
要生成的图像数。必须介于 1 和 10 之间。
size
string
可选
生成图像的大小。必须是256x256、512x512或 1024x1024之一。
示例
{"model":"black-forest-labs/flux-schnell","prompt":"black forest gateau cake spelling out the words \"FLUX SCHNELL\", tasty, food photography, dynamic shot","go_fast":true,"num_outputs":1,"aspect_ratio":"1:1","output_format":"webp","output_quality":80}