
🇺🇸 English

🇺🇸 English
- Chat Models
- Anthropic
- Suno
- Udio
- Midjourney API
- Flux
- Recraft
- Ideogram
- Luma
- Runway
- Kling-API
- Replicate
- MiniMax
Generate
POST
/flux/v1/{model}
最后修改时间:2025-02-05 11:27:06
The parameters are consistent with the official
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Path 参数
model
string
必需
示例值:
flux-dev
Header 参数
Authorization
string
可选
默认值:
{{YOUR_API_KEY}}
Body 参数application/json
object {0}
示例
{
"prompt": "ein fantastisches bild",
"width": 1024,
"height": 768,
"steps": 40,
"prompt_upsampling": false,
"seed": 42,
"guidance": 2.5,
"safety_tolerance": 2,
"interval": 2,
"output_format": "jpeg"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/flux/v1/flux-dev' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "ein fantastisches bild",
"width": 1024,
"height": 768,
"steps": 40,
"prompt_upsampling": false,
"seed": 42,
"guidance": 2.5,
"safety_tolerance": 2,
"interval": 2,
"output_format": "jpeg"
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{"id":"a8b95720-6eb2-4ef2-b120-2a1b99d41324"}