Flux绘图
Flux 绘画模型走通用 Images 接口:| 说明 | 方法 | 路径 |
|---|---|---|
| 文生图 | POST | /v1/images/generations |
https://api.omniall.ai · 鉴权 Authorization: Bearer sk-... · 模型 ID 以模型广场为准。
支持模型
| 模型 ID | 说明 |
|---|---|
flux-3-image-klein | FLUX 3 轻量开源版:文生图,高清输出,成本更低、速度更快 |
flux-pro-1.1-ultra | Flux 1.1 Pro Ultra 档位(以模型广场为准) |
flux-kontext-pro | Flux Kontext Pro(以模型广场为准) |
要点
| 项 | 说明 |
|---|---|
| 接口 | POST /v1/images/generations |
| 比例 / 尺寸 | 按上游渠道可使用 size 或 aspect_ratio(如 1024x1024、1:1) |
| 返回 | 推荐 response_format=url |
快速示例
# flux-3-image-klein
curl https://api.omniall.ai/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-3-image-klein",
"prompt": "a glass cube under soft amber light, product photo",
"size": "1024x1024",
"n": 1,
"response_format": "url"
}'
# flux-pro-1.1-ultra
curl https://api.omniall.ai/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-pro-1.1-ultra",
"prompt": "cinematic portrait, soft rim light, photorealistic",
"size": "1024x1024",
"n": 1,
"response_format": "url"
}'