/v1/* 接口都需要 API Key:| Public model | 能力 | 计费口径 |
|---|---|---|
seedream-4.0 | 文生图、图片编辑 | 按输出图片张数 |
seedream-4.5 | 文生图、图片编辑 | 按输出图片张数 |
seedream-5.0-lite | 文生图、图片编辑 | 按输出图片张数 |
| 请求形态 | 操作类型 |
|---|---|
| 不传参考图 | 文生图 |
传 image / image_url / image_urls / images | 图片编辑 |
计费建议:按实际输出图片张数计费。 custom_size、横图、竖图、比例本身不改变计费。
| 场景 | Endpoint | 等待结果 | 返回形态 |
|---|---|---|---|
| 文生图,同步拿图 | POST /v1/images/generations | 是 | data[].url |
| 图片编辑,同步拿图 | POST /v1/images/edits | 是 | data[].url |
| 参数 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
model | string | body | 是 | seedream-4.0、seedream-4.5、seedream-5.0-lite |
prompt | string | body | 是 | 文生图或编辑提示词 |
n | integer | body | 否 | 输出图片数,1 到 6。OpenAI 兼容字段 |
custom_size | object | body | 否 | 自定义输出尺寸,例如 {"width": 2048, "height": 2048} |
image | string / array | body / form | 编辑必填之一 | 参考图 URL,可传单张或多张 |
image_url | string / object / array | body / form | 编辑必填之一 | 参考图 URL,兼容 { "url": "..." } 写法 |
image_urls | array | body / form | 编辑必填之一 | 多参考图 URL |
images | array | body | 编辑必填之一 | 多参考图 URL,支持字符串或对象 |
timeout_seconds | integer | body | 否 | 同步接口等待超时时间 |
n116{
"num_images": 3
}{
"n": 3
}custom_size 尺寸规则{
"custom_size": {
"width": 2048,
"height": 2048
}
}| 模型 | 最小总像素 | 最大总像素 | 最大边长 | 是否要求 16 倍数 |
|---|---|---|---|---|
seedream-4.0 | 921600 | 16777216 | 4096 | 否 |
seedream-4.5 | 3686400 | 16777216 | 4096 | 否 |
seedream-5.0-lite | 3686400 | 16777216 | 4096 | 否 |
| 尺寸 | 比例 | seedream-4.0 | seedream-4.5 | seedream-5.0-lite |
|---|---|---|---|---|
960x960 | 1:1 | 可用 | 不可用,低于最小像素 | 不可用,低于最小像素 |
1280x720 | 16:9 | 可用 | 不可用,低于最小像素 | 不可用,低于最小像素 |
720x1280 | 9:16 | 可用 | 不可用,低于最小像素 | 不可用,低于最小像素 |
2048x2048 | 1:1 | 可用 | 可用 | 可用 |
2560x1440 | 16:9 | 可用 | 可用 | 可用 |
1440x2560 | 9:16 | 可用 | 可用 | 可用 |
2304x1728 | 4:3 | 可用 | 可用 | 可用 |
1728x2304 | 3:4 | 可用 | 可用 | 可用 |
4096x4096 | 1:1 | 可用,最大像素 | 可用,最大像素 | 可用,最大像素 |
{
"image": "https://example.com/a.png"
}{
"image_url": "https://example.com/a.png"
}{
"image_url": {
"url": "https://example.com/a.png"
}
}{
"image_urls": [
"https://example.com/a.png",
"https://example.com/b.png"
]
}{
"images": [
"https://example.com/a.png",
{ "url": "https://example.com/b.png" },
{ "image_url": "https://example.com/c.png" }
]
}| 限制 | 值 |
|---|---|
| 单次输入参考图最多 | 10 张 |
| 单次输出图最多 | 6 张 |
| 输入图数 + 输出图数最多 | 15 张 |
| 输入参考图数量 | 最大 num_images |
|---|---|
1 | 6 |
5 | 6 |
9 | 6 |
10 | 5 |
{
"created": 1778688000,
"data": [
{
"url": "https://example.com/generated-1.png"
}
]
}seedream-4.5 和 seedream-5.0-lite 的最小像素更高,建议用 2560x1440 起步:seedream-4.0 小尺寸示例1280x720 只适合 seedream-4.0,不适合 seedream-4.5 和 seedream-5.0-lite。images 数组对象写法