doubao-seedream-4-5-251128。
对于特定内容请求,请选择 Special-Ns 资源分组。
核心能力
- 文生图 — 根据文本提示词生成图片
- 图生图 — 使用一张或多张参考图和文本提示词生成图片
- 连续生成 — 单次请求生成多张相关图片
- 输出控制 — 配置尺寸、随机种子、水印和 Logo
- 文生图
- 图生图
快速示例
curl https://www.anyfast.ai/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-4-5-251128",
"prompt": "日出时分宁静的山景,山谷间弥漫薄雾",
"size": "1024x1024",
"watermark": false
}'
import requests
response = requests.post(
"https://www.anyfast.ai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"},
json={
"model": "doubao-seedream-4-5-251128",
"prompt": "日出时分宁静的山景,山谷间弥漫薄雾",
"size": "1024x1024",
"watermark": False,
},
)
print(response.json())
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 doubao-seedream-4-5-251128 |
prompt | string | 是 | 图片生成提示词 |
size | string | 否 | 输出尺寸,如 1024x1024 或 2K |
watermark | boolean | 否 | 是否添加水印,默认 false |
seed | integer | 否 | 随机种子 |
logo_info | object | 否 | Logo 配置:add_logo、position、language、opacity |
快速示例
curl https://www.anyfast.ai/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-4-5-251128",
"prompt": "生成女孩和奶牛玩偶在早晨、中午和夜晚乘坐过山车的连贯图片",
"image": ["https://example.com/ref1.png", "https://example.com/ref2.png"],
"sequential_image_generation": "auto",
"sequential_image_generation_options": {"max_images": 3},
"size": "2K",
"watermark": false
}'
import requests
response = requests.post(
"https://www.anyfast.ai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"},
json={
"model": "doubao-seedream-4-5-251128",
"prompt": "生成女孩和奶牛玩偶在早晨、中午和夜晚乘坐过山车的连贯图片",
"image": ["https://example.com/ref1.png", "https://example.com/ref2.png"],
"sequential_image_generation": "auto",
"sequential_image_generation_options": {"max_images": 3},
"size": "2K",
"watermark": False,
},
)
print(response.json())
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 doubao-seedream-4-5-251128 |
prompt | string | 是 | 图片生成或编辑提示词 |
image | string[] | 是 | 参考图片 URL 数组 |
sequential_image_generation | string | 否 | 设为 auto 开启批量生成 |
sequential_image_generation_options.max_images | integer | 否 | 最大生成图片数量 |
size | string | 否 | 输出尺寸,如 1024x1024 或 2K |
watermark | boolean | 否 | 是否添加水印,默认 false |
seed | integer | 否 | 随机种子 |
logo_info | object | 否 | Logo 配置:add_logo、position、language、opacity |
API 参考
查看 Seedream 4.5 文生图和图生图 API。