核心能力
- 文生图 — 根据文字描述生成图片
- 灵活尺寸 — 通过
size指定输出分辨率(推荐1024x1024) - 可复现 — 使用
seed实现确定性生成 - 格式可选 — 支持
jpeg或png输出
快速示例
参数说明
响应字段
API 参考
查看 FLUX.1.1 [pro] 的交互式 API Playground。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
通过 Starrise AI API 调用 Black Forest Labs FLUX.1.1 [pro] 文生图模型。
size 指定输出分辨率(推荐 1024x1024)seed 实现确定性生成jpeg 或 png 输出curl https://ai.alad.com/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-1.1-pro",
"prompt": "一只可爱的北极熊宝宝",
"size": "1024x1024"
}'
import requests
response = requests.post(
"https://ai.alad.com/v1/images/generations",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "flux-1.1-pro",
"prompt": "一只可爱的北极熊宝宝",
"size": "1024x1024"
}
)
result = response.json()
# result["data"][0]["b64_json"] 包含 Base64 编码的图片
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 flux-1.1-pro |
prompt | string | 是 | 图片描述文字 |
n | integer | 否 | 生成张数(1–4),默认 1 |
size | string | 否 | 输出尺寸,如 1024x1024 |
output_format | string | 否 | jpeg 或 png |
seed | integer | 否 | 随机种子,用于复现 |
| 字段 | 说明 |
|---|---|
data[].b64_json | Base64 编码的图片数据 |
created | 创建时间戳 |
