> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 多轮编辑一致性

> 连续编辑同一张图片时，保持主体特征、构图和未改动区域在多轮之间一致。

Seedream 5.5 支持对同一张图片连续编辑，并提升了多轮之间主体特征、构图和未改动区域的一致性。做法很简单：把上一轮返回的图片作为下一轮的 `image`，在提示词里写清楚**要改什么**、**要保留什么**。

> [!TIP]
>
> 为了让多轮编辑更一致，建议输入图片不带透明通道（RGB 图片），并在编辑时把 `background` 设为 `opaque`。

## 效果示例

下面的例子对同一张人像连续编辑三轮，每一轮都以上一轮的输出作为输入，并保留之前的修改。

| 原图 | 第 1 轮：加泡泡糖 | 第 2 轮：加墨镜 | 第 3 轮：换墨镜 | 连续效果 |
| - | - | - | - | - |
| ![原始输入](https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-multi-round-editing-input.png) | ![第一轮，加泡泡糖](https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-round-1-20261103.png) | ![第二轮，加墨镜](https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-round-2-20261103.png) | ![第三轮，换墨镜](https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-round-3-sunglasses-20261103.png) | ![多轮编辑结果](https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-multi-round-editing-demo2.gif) |

[观看演示视频](https://arkdocs-en.tos-ap-southeast-1.volces.com/videos/image-generation/seedream-5-5-multi-round-editing-demo.mp4)

## 请求示例

下面是第 1 轮的请求。示例中的 `$DREAMTO_API_KEY` 为你的 API Key。

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/api/v3/images/generations" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5.5",
    "prompt": "让人物吹出一个圆形的粉色半透明泡泡糖泡泡。保持人物的身份、五官、眼神、发型、珍珠耳环、服装、姿势、蓝色背景、构图和画面风格不变。",
    "image": "https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-multi-round-editing-input.png",
    "size": "2K",
    "output_format": "png",
    "background": "opaque",
    "response_format": "url",
    "watermark": true
  }'
```

```python Python theme={null}
import os

import requests

URL = "https://api.dreamto.ai/api/v3/images/generations"
HEADERS = {"Authorization": f"Bearer {os.environ['DREAMTO_API_KEY']}"}

payload = {
    "model": "seedream-5.5",
    "prompt": "让人物吹出一个圆形的粉色半透明泡泡糖泡泡。保持人物的身份、五官、眼神、发型、珍珠耳环、服装、姿势、蓝色背景、构图和画面风格不变。",
    "image": "https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-multi-round-editing-input.png",
    "size": "2K",
    "output_format": "png",
    "background": "opaque",
    "response_format": "url",
    "watermark": True
}

result = requests.post(URL, headers=HEADERS, json=payload, timeout=600).json()
for image in result["data"]:
    print(image["url"])
```

```python OpenAI SDK theme={null}
import os

from openai import OpenAI

client = OpenAI(base_url="https://api.dreamto.ai/api/v3", api_key=os.environ["DREAMTO_API_KEY"])

response = client.images.generate(
    model="seedream-5.5",
    prompt="让人物吹出一个圆形的粉色半透明泡泡糖泡泡。保持人物的身份、五官、眼神、发型、珍珠耳环、服装、姿势、蓝色背景、构图和画面风格不变。",
    size="2K",
    output_format="png",
    background="opaque",
    response_format="url",
    extra_body={
        "image": "https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-multi-round-editing-input.png",
        "watermark": True,
    },
)
for item in response.data:
    print(item)
```

后续轮次只需要把上一轮响应中的 `data[0].url` 作为新的 `image`，并替换 `prompt`（例如“给人物戴上一副黑色墨镜，其余保持不变”）。图片链接 24 小时内有效，隔天继续编辑请先自行保存图片。

交互式编辑（在图上用坐标、选框、箭头等标出修改位置）的用法相同：把带标记的图片作为 `image`，在提示词里说明标记的含义并要求移除标记。全部参数见 [生成图片](https://docs.dreamto.ai/api-reference/seedream-5-5/create-image.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.